summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--camlibs/adc65/adc65.c18
-rw-r--r--camlibs/agfa-cl20/agfa_cl20.c42
-rw-r--r--camlibs/aox/aox.c58
-rw-r--r--camlibs/aox/aox.h6
-rw-r--r--camlibs/aox/library.c92
-rw-r--r--camlibs/ax203/ax203.c36
-rw-r--r--camlibs/ax203/ax203.h2
-rw-r--r--camlibs/ax203/ax203_compress_jpeg.c16
-rw-r--r--camlibs/ax203/ax203_decode_yuv.c2
-rw-r--r--camlibs/ax203/ax203_decode_yuv_delta.c12
-rw-r--r--camlibs/ax203/jpeg_memsrcdest.c10
-rw-r--r--camlibs/ax203/library.c14
-rw-r--r--camlibs/ax203/tinyjpeg-internal.h2
-rw-r--r--camlibs/ax203/tinyjpeg.c4
-rw-r--r--camlibs/ax203/tinyjpeg.h2
-rw-r--r--camlibs/canon/canon.c334
-rw-r--r--camlibs/canon/canon.h32
-rw-r--r--camlibs/canon/library.c100
-rw-r--r--camlibs/canon/ps350/ps350chk.c4
-rw-r--r--camlibs/canon/ps350/renamejpg.c4
-rw-r--r--camlibs/canon/serial.c12
-rw-r--r--camlibs/canon/serial.h4
-rw-r--r--camlibs/canon/usb.c52
-rw-r--r--camlibs/canon/usb.h10
-rw-r--r--camlibs/canon/util.c2
-rw-r--r--camlibs/casio/camtojpeg.c12
-rw-r--r--camlibs/casio/casio-qv-commands.c20
-rw-r--r--camlibs/casio/casio-qv-commands.h6
-rw-r--r--camlibs/casio/casio-qv.c18
-rw-r--r--camlibs/casio/ycctoppm.c2
-rw-r--r--camlibs/clicksmart310/clicksmart.c68
-rw-r--r--camlibs/clicksmart310/clicksmart.h16
-rw-r--r--camlibs/clicksmart310/library.c14
-rw-r--r--camlibs/clicksmart310/spca50x-jpeg-header.h18
-rw-r--r--camlibs/digigr8/digi_postprocess.c34
-rw-r--r--camlibs/digigr8/digigr8.c44
-rw-r--r--camlibs/digigr8/digigr8.h18
-rw-r--r--camlibs/digigr8/library.c2
-rw-r--r--camlibs/digita/digita.c8
-rw-r--r--camlibs/dimera/dimera3500.c24
-rw-r--r--camlibs/dimera/dimeratab.h6
-rw-r--r--camlibs/dimera/mesalib.c18
-rw-r--r--camlibs/directory/directory.c24
-rw-r--r--camlibs/enigma13/enigma13.c32
-rw-r--r--camlibs/fuji/fuji.h6
-rw-r--r--camlibs/fuji/library.c16
-rw-r--r--camlibs/gsmart300/library.c20
-rw-r--r--camlibs/hp215/crctab.h12
-rw-r--r--camlibs/hp215/hp215.c8
-rw-r--r--camlibs/hp215/hp215.h2
-rw-r--r--camlibs/iclick/iclick.c54
-rw-r--r--camlibs/iclick/iclick.h24
-rw-r--r--camlibs/iclick/library.c2
-rw-r--r--camlibs/jamcam/jamcam.c2
-rw-r--r--camlibs/jamcam/library.c6
-rw-r--r--camlibs/jd11/decomp.c10
-rw-r--r--camlibs/jd11/decomp.h10
-rw-r--r--camlibs/jd11/jd11.c30
-rw-r--r--camlibs/jd11/serial.c20
-rw-r--r--camlibs/jd11/serial.h10
-rw-r--r--camlibs/jl2005a/jl2005a.c58
-rw-r--r--camlibs/jl2005a/jl2005a.h10
-rw-r--r--camlibs/jl2005c/img_enhance.c6
-rw-r--r--camlibs/jl2005c/jl2005bcd_decompress.c2
-rw-r--r--camlibs/jl2005c/jpeg_memsrcdest.c2
-rw-r--r--camlibs/jl2005c/library.c2
-rw-r--r--camlibs/kodak/dc120/dc120.c106
-rw-r--r--camlibs/kodak/dc120/dc120.h10
-rw-r--r--camlibs/kodak/dc120/library.c70
-rw-r--r--camlibs/kodak/dc120/library.h4
-rw-r--r--camlibs/kodak/dc210/dc210.c128
-rw-r--r--camlibs/kodak/dc210/dc210.h38
-rw-r--r--camlibs/kodak/dc210/library.c152
-rw-r--r--camlibs/kodak/dc240/dc240.c60
-rw-r--r--camlibs/kodak/dc240/library.c2
-rw-r--r--camlibs/kodak/dc240/library.h6
-rw-r--r--camlibs/kodak/dc3200/dc3200.c46
-rw-r--r--camlibs/konica/konica.c12
-rw-r--r--camlibs/konica/konica.h28
-rw-r--r--camlibs/konica/lowlevel.c48
-rw-r--r--camlibs/konica/lowlevel.h8
-rw-r--r--camlibs/konica/qm150.c102
-rw-r--r--camlibs/largan/lmini/largan.c34
-rw-r--r--camlibs/largan/lmini/lmini.c36
-rw-r--r--camlibs/largan/lmini/lmini.h8
-rw-r--r--camlibs/lg_gsm/lg_gsm.c22
-rw-r--r--camlibs/lg_gsm/lg_gsm.h6
-rw-r--r--camlibs/lg_gsm/library.c22
-rw-r--r--camlibs/lumix/lumix.c58
-rw-r--r--camlibs/mars/library.c78
-rw-r--r--camlibs/mars/mars.c128
-rw-r--r--camlibs/mars/mars.h8
-rw-r--r--camlibs/minolta/dimagev/capture.c12
-rw-r--r--camlibs/minolta/dimagev/data.c8
-rw-r--r--camlibs/minolta/dimagev/delete.c16
-rw-r--r--camlibs/minolta/dimagev/dimagev.c36
-rw-r--r--camlibs/minolta/dimagev/download.c22
-rw-r--r--camlibs/minolta/dimagev/info.c2
-rw-r--r--camlibs/minolta/dimagev/packet.c10
-rw-r--r--camlibs/minolta/dimagev/status.c4
-rw-r--r--camlibs/minolta/dimagev/upload.c6
-rw-r--r--camlibs/minolta/dimagev/util.c4
-rw-r--r--camlibs/mustek/image.h2
-rw-r--r--camlibs/mustek/io.c10
-rw-r--r--camlibs/mustek/mdc800_spec.h2
-rw-r--r--camlibs/mustek/mustek-config.c92
-rw-r--r--camlibs/mustek/print.h2
-rw-r--r--camlibs/mustek/usb.c12
-rw-r--r--camlibs/panasonic/coolshot/coolshot.c2
-rw-r--r--camlibs/panasonic/coolshot/library.c2
-rw-r--r--camlibs/panasonic/dc.c2
-rw-r--r--camlibs/panasonic/dc.h16
-rw-r--r--camlibs/panasonic/dc1000.c174
-rw-r--r--camlibs/panasonic/dc1000.h6
-rw-r--r--camlibs/panasonic/dc1580.c44
-rw-r--r--camlibs/panasonic/dc1580.h6
-rw-r--r--camlibs/panasonic/l859/l859.c2
-rw-r--r--camlibs/pccam300/library.c8
-rw-r--r--camlibs/pccam300/pccam300.c4
-rw-r--r--camlibs/pccam300/pccam300.h2
-rw-r--r--camlibs/pccam600/library.c34
-rw-r--r--camlibs/pccam600/pccam600.c16
-rw-r--r--camlibs/pccam600/pccam600.h2
-rw-r--r--camlibs/pentax/js0n.c22
-rw-r--r--camlibs/pentax/library.c8
-rw-r--r--camlibs/polaroid/dlink350f.c28
-rw-r--r--camlibs/polaroid/dlink350f.h6
-rw-r--r--camlibs/polaroid/jd350e.c22
-rw-r--r--camlibs/polaroid/jd350e.h8
-rw-r--r--camlibs/polaroid/jd350e_blue.h4
-rw-r--r--camlibs/polaroid/jd350e_red.h2
-rw-r--r--camlibs/polaroid/pdc320.c10
-rw-r--r--camlibs/ptp2/chdk.c18
-rw-r--r--camlibs/ptp2/chdk_live_view.h6
-rw-r--r--camlibs/ptp2/chdk_ptp.h16
-rw-r--r--camlibs/ptp2/config.c78
-rw-r--r--camlibs/ptp2/library.c62
-rw-r--r--camlibs/ptp2/music-players.h4
-rw-r--r--camlibs/ptp2/olympus-wrap.c26
-rw-r--r--camlibs/ptp2/olympus-wrap.h6
-rw-r--r--camlibs/ptp2/ptp-bugs.h6
-rw-r--r--camlibs/ptp2/ptp-pack.c70
-rw-r--r--camlibs/ptp2/ptp.c246
-rw-r--r--camlibs/ptp2/ptp.h174
-rw-r--r--camlibs/ptp2/ptpip.c24
-rw-r--r--camlibs/ricoh/crctab.h12
-rw-r--r--camlibs/ricoh/g3.c36
-rw-r--r--camlibs/ricoh/library.c28
-rw-r--r--camlibs/ricoh/ricoh.c24
-rw-r--r--camlibs/ricoh/ricoh.h6
-rw-r--r--camlibs/samsung/samsung.c20
-rw-r--r--camlibs/sierra/epson-desc.c50
-rw-r--r--camlibs/sierra/library.c86
-rw-r--r--camlibs/sierra/library.h12
-rw-r--r--camlibs/sierra/nikon-desc.c152
-rw-r--r--camlibs/sierra/olympus-desc.c208
-rw-r--r--camlibs/sierra/sierra-desc.c48
-rw-r--r--camlibs/sierra/sierra-desc.h12
-rw-r--r--camlibs/sierra/sierra-usbwrap.c22
-rw-r--r--camlibs/sierra/sierra-usbwrap.h6
-rw-r--r--camlibs/sierra/sierra.c118
-rw-r--r--camlibs/sierra/sierra.h6
-rw-r--r--camlibs/sipix/blink2.c18
-rw-r--r--camlibs/sipix/web2.c24
-rw-r--r--camlibs/sipix/xjpeg.c14
-rw-r--r--camlibs/smal/smal.c44
-rw-r--r--camlibs/smal/smal.h6
-rw-r--r--camlibs/smal/ultrapocket.c20
-rw-r--r--camlibs/smal/ultrapocket.h6
-rw-r--r--camlibs/sonix/library.c116
-rw-r--r--camlibs/sonix/sonix.c150
-rw-r--r--camlibs/sonix/sonix.h10
-rw-r--r--camlibs/sonydscf55/camera.c4
-rw-r--r--camlibs/sonydscf55/sony.c8
-rw-r--r--camlibs/soundvision/agfa_cl18.c178
-rw-r--r--camlibs/soundvision/commands.c86
-rw-r--r--camlibs/soundvision/commands.h10
-rw-r--r--camlibs/soundvision/soundvision.c188
-rw-r--r--camlibs/soundvision/soundvision.h34
-rw-r--r--camlibs/soundvision/tiger_fastflicks.c284
-rw-r--r--camlibs/spca50x/library.c4
-rw-r--r--camlibs/spca50x/spca50x-flash.c2
-rw-r--r--camlibs/spca50x/spca50x.c2
-rw-r--r--camlibs/sq905/library.c26
-rw-r--r--camlibs/sq905/postprocess.c66
-rw-r--r--camlibs/sq905/sq905.c62
-rw-r--r--camlibs/sq905/sq905.h14
-rw-r--r--camlibs/st2205/library.c14
-rw-r--r--camlibs/st2205/st2205.c12
-rw-r--r--camlibs/st2205/st2205.h2
-rw-r--r--camlibs/st2205/st2205_decode.c2
-rw-r--r--camlibs/stv0674/library.c6
-rw-r--r--camlibs/stv0674/library.h6
-rw-r--r--camlibs/stv0674/stv0674.c8
-rw-r--r--camlibs/stv0674/stv0674.h6
-rw-r--r--camlibs/stv0680/bayer.h14
-rw-r--r--camlibs/stv0680/demosaic_sharpen.h4
-rw-r--r--camlibs/stv0680/library.h8
-rw-r--r--camlibs/stv0680/saturate.c12
-rw-r--r--camlibs/stv0680/sharpen.c6
-rw-r--r--camlibs/stv0680/sharpen.h2
-rw-r--r--camlibs/stv0680/stv0680.c38
-rw-r--r--camlibs/stv0680/stv0680.h10
-rw-r--r--camlibs/sx330z/library.c56
-rw-r--r--camlibs/sx330z/sx330z.c64
-rw-r--r--camlibs/sx330z/sx330z.h18
-rw-r--r--camlibs/template/template.c40
-rw-r--r--camlibs/topfield/crc16.c2
-rw-r--r--camlibs/topfield/crc16.h2
-rw-r--r--camlibs/topfield/mjd.c2
-rw-r--r--camlibs/topfield/mjd.h2
-rw-r--r--camlibs/topfield/puppy.c14
-rw-r--r--camlibs/topfield/tf_bytes.c2
-rw-r--r--camlibs/topfield/tf_bytes.h2
-rw-r--r--camlibs/topfield/usb_io.c2
-rw-r--r--camlibs/topfield/usb_io.h2
-rw-r--r--camlibs/toshiba/pdrm11/library.c18
-rw-r--r--camlibs/toshiba/pdrm11/pdrm11.c26
-rw-r--r--camlibs/toshiba/pdrm11/pdrm11.h8
-rw-r--r--camlibs/tp6801/library.c14
-rw-r--r--camlibs/tp6801/tp6801-dump.c6
-rw-r--r--camlibs/tp6801/tp6801.c8
-rw-r--r--camlibs/tp6801/tp6801.h2
-rw-r--r--coverity-model.c2
-rw-r--r--examples/best-iso.c2
-rw-r--r--examples/config.c2
-rw-r--r--examples/focus.c2
-rw-r--r--examples/lunkwill-canon-capture.c4
-rw-r--r--examples/preview.c4
-rw-r--r--examples/sample-afl.c2
-rw-r--r--examples/sample-capture.c6
-rw-r--r--examples/sample-owner.c2
-rw-r--r--examples/sample-photobooth.c2
-rw-r--r--examples/sample-tether.c2
-rw-r--r--examples/sample-trigger-capture.c6
-rw-r--r--gphoto2/gphoto2-abilities-list.h10
-rw-r--r--gphoto2/gphoto2-camera.h64
-rw-r--r--gphoto2/gphoto2-context.h10
-rw-r--r--gphoto2/gphoto2-file.h6
-rw-r--r--gphoto2/gphoto2-filesys.h24
-rw-r--r--gphoto2/gphoto2-library.h12
-rw-r--r--gphoto2/gphoto2-list.h14
-rw-r--r--gphoto2/gphoto2-result.h14
-rw-r--r--gphoto2/gphoto2-setting.h6
-rw-r--r--gphoto2/gphoto2-version.h6
-rw-r--r--gphoto2/gphoto2-widget.h18
-rw-r--r--gphoto2/gphoto2.h6
-rw-r--r--libgphoto2/ahd_bayer.c238
-rw-r--r--libgphoto2/bayer.c16
-rw-r--r--libgphoto2/bayer.h14
-rw-r--r--libgphoto2/exif.c2
-rw-r--r--libgphoto2/exif.h2
-rw-r--r--libgphoto2/gamma.c10
-rw-r--r--libgphoto2/gamma.h8
-rw-r--r--libgphoto2/gphoto2-abilities-list.c24
-rw-r--r--libgphoto2/gphoto2-camera.c68
-rw-r--r--libgphoto2/gphoto2-context.c14
-rw-r--r--libgphoto2/gphoto2-file.c28
-rw-r--r--libgphoto2/gphoto2-filesys.c12
-rw-r--r--libgphoto2/gphoto2-library.c12
-rw-r--r--libgphoto2/gphoto2-list.c10
-rw-r--r--libgphoto2/gphoto2-result.c10
-rw-r--r--libgphoto2/gphoto2-setting.c6
-rw-r--r--libgphoto2/gphoto2-version.c6
-rw-r--r--libgphoto2/gphoto2-widget.c92
-rw-r--r--libgphoto2/jpeg.h2
-rw-r--r--libgphoto2_port/disk/disk.c10
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-info-list.h10
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-library.h16
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-log.h42
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-portability.h8
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-result.h8
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port-version.h6
-rw-r--r--libgphoto2_port/gphoto2/gphoto2-port.h28
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c14
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-info.h6
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-log.c36
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c30
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-result.c8
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-version.c6
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port.c40
-rw-r--r--libgphoto2_port/libusb1/libusb1.c48
-rw-r--r--libgphoto2_port/ptpip/ptpip.c8
-rw-r--r--libgphoto2_port/serial/unix.c30
-rw-r--r--libgphoto2_port/test/test-gp-port.c12
-rw-r--r--libgphoto2_port/test/test-port-list.c10
-rw-r--r--libgphoto2_port/usb/libusb.c56
-rw-r--r--libgphoto2_port/usb/usb-os2.c2
-rw-r--r--libgphoto2_port/usbdiskdirect/linux.c12
-rw-r--r--libgphoto2_port/usbscsi/linux.c10
-rw-r--r--libgphoto2_port/vusb/vcamera.h6
-rw-r--r--libgphoto2_port/vusb/vusb.c30
-rw-r--r--packaging/generic/print-camera-list.c100
-rw-r--r--tests/ddb/ddb-common.c6
-rw-r--r--tests/ddb/ddb-common.h8
-rw-r--r--tests/ddb/test-ddb.c10
-rw-r--r--tests/test-camera-list.c24
-rw-r--r--tests/test-endian.c6
-rw-r--r--tests/test-filesys.c20
-rw-r--r--tests/test-gphoto2.c6
300 files changed, 4163 insertions, 4163 deletions
diff --git a/camlibs/adc65/adc65.c b/camlibs/adc65/adc65.c
index ae1595359..1b771e791 100644
--- a/camlibs/adc65/adc65.c
+++ b/camlibs/adc65/adc65.c
@@ -1,6 +1,6 @@
/* ADC-65(s) camera driver
- * Released under the GPL version 2
- *
+ * Released under the GPL version 2
+ *
* Copyright 2001
* Benjamin Moos
* <benjamin@psnw.com>
@@ -126,7 +126,7 @@ adc65_read_data (Camera *camera, unsigned char *cmd, int cmd_size, int data_type
*/
strcpy(s, ppmhead);
z = strlen(s);
-
+
for (y=0; y<256; y++) {
if (y == 255) {
y1 = y - 1;
@@ -143,24 +143,24 @@ adc65_read_data (Camera *camera, unsigned char *cmd, int cmd_size, int data_type
bl = (unsigned char)us[y1 * 256 + x];
ur = (unsigned char)us[y * 256 + x1];
br = (unsigned char)us[y1 * 256 + x1];
-
- switch ( ((y & 1) << 1) | (x & 1) ) {
- case 0: /* even row, even col, B */
+
+ switch ( ((y & 1) << 1) | (x & 1) ) {
+ case 0: /* even row, even col, B */
rgb.R = br;
rgb.G = (ur + bl) / 2;
rgb.B = ul;
break;
- case 1: /* even row, odd col, G */
+ case 1: /* even row, odd col, G */
rgb.R = bl;
rgb.G = ul;
rgb.B = ur;
break;
- case 2: /* odd row, even col, G */
+ case 2: /* odd row, even col, G */
rgb.R = ur;
rgb.G = ul;
rgb.B = bl;
break;
- case 3: /* odd row, odd col, R */
+ case 3: /* odd row, odd col, R */
default:
rgb.R = ul;
rgb.G = (ur + bl) / 2;
diff --git a/camlibs/agfa-cl20/agfa_cl20.c b/camlibs/agfa-cl20/agfa_cl20.c
index d63b27e1a..e9c94368e 100644
--- a/camlibs/agfa-cl20/agfa_cl20.c
+++ b/camlibs/agfa-cl20/agfa_cl20.c
@@ -8,7 +8,7 @@
* - fix number of picturs detection
* - get rid of the heavy stack usage and use the heap instead
* - fix USB download size
- *
+ *
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -70,13 +70,13 @@ static unsigned short to_camera(unsigned short a)
unsigned short ret = 0;
ret = ret + (a / 1000) * 0x1000;
- a = a % 1000;
+ a = a % 1000;
ret = ret + ((a / 100) * 0x100);
a = a % 100;
ret = ret + ((a / 10) * 0x10);
a = a % 10;
ret = ret + a;
-
+
return ret;
}
@@ -90,13 +90,13 @@ static unsigned short from_camera(unsigned short a)
unsigned short ret = 0;
ret = ret + ((a / 0x1000) * 1000);
- a = a % 0x1000;
+ a = a % 0x1000;
ret = ret + ((a / 0x100) * 100);
a = a % 0x100;
ret = ret + ((a / 0x10) * 10);
a = a % 0x10;
ret = ret + a;
-
+
return ret;
}
@@ -162,7 +162,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
unsigned char * result;
unsigned char * ptr;
-
+
/* unsigned char last, next; */
GP_DEBUG(" * get_file_func()");
@@ -182,19 +182,19 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
gp_port_read(camera->port, (char*)indata, 0x100);
size = indata[ 5 ] + (indata[ 6 ] * 0xFF) + 3;
-
+
resolution = (unsigned char)indata[ 17 ];
if (resolution == 1) {
char dummy;
result = calloc((size + 1), 0x100);
ptr = result;
-
+
gp_port_usb_msg_read(camera->port,0x00,0x0000,0x0521,&dummy,0x0001);
gp_port_usb_msg_read(camera->port,0x00,0x0000,0x8000,&dummy,0x0001);
gp_port_usb_msg_write(camera->port,0x0A,to_camera(n),0x000A,NULL,0x0);
-
+
for (j = 0; j < size; j++) {
gp_port_read(camera->port, (char*)ptr, 0x100);
ptr += 0x100;
@@ -254,7 +254,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
data = (unsigned char *)calloc(size, 0x100);
ptr = data;
-
+
gp_port_usb_msg_write(camera->port,0x0A,to_camera(n),0x000B,NULL,0x0);
if (size < 100) {
for (j = 0; j < size; j++) {
@@ -287,14 +287,14 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
unsigned int offset = 0;
result = calloc(1, 128 * 96 * 4 * 4 + 100 );
-
+
memcpy(result, "P3\n128 96\n255\n", 14);
offset = offset + 14;
temp1 = data[ thumb_start + pixel_count ];
while (pixel_count < (128*96*2)) {
-
+
temp1 = data[ thumb_start + pixel_count ];
temp2 = data[ thumb_start + pixel_count + 1 ];
temp3 = data[ thumb_start + pixel_count + 2 ];
@@ -345,18 +345,18 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
break;
}
-
+
case GP_FILE_TYPE_RAW: {
char dummy;
GP_DEBUG(" * REQUEST FOR RAW IMAGE");
-
+
gp_port_usb_msg_write(camera->port,0x0A,to_camera(n),0x0008,NULL,0x0);
gp_port_read(camera->port, (char*)indata, 0x100);
size = indata[ 5 ] + (indata[ 6 ] * 0xFF) + 3;
result = calloc(size, 0x100);
ptr = result;
-
+
gp_port_usb_msg_read(camera->port,0x00,0x0000,0x0521,&dummy,0x0001);
gp_port_usb_msg_read(camera->port,0x00,0x0000,0x8000,&dummy,0x0001);
@@ -387,15 +387,15 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
gp_port_read(camera->port, (char*)indata, 0x100);
size = indata[ 5 ] + (indata[ 6 ] * 0xFF) + 3;
-
+
result = calloc((size+1), 0x100);
ptr = result;
-
+
gp_port_usb_msg_read(camera->port,0x00,0x0000,0x0521,&dummy,0x0001);
gp_port_usb_msg_read(camera->port,0x00,0x0000,0x8000,&dummy,0x0001);
gp_port_usb_msg_write(camera->port,0x0A,to_camera(n),0x000A,NULL,0x0);
-
+
for (j = 0; j < size; j++) {
gp_port_read(camera->port, (char*)ptr, 0x100);
ptr += 0x100;
@@ -436,7 +436,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
result[17] = 0x01;
result[18] = 0x00;
result[19] = 0x00;
-
+
memmove(&result[20],
&result[app1len + 4],
(unsigned int)(size - app1len - 4));
@@ -540,7 +540,7 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
} else {
has_compact_flash = 0;
}
-
+
if (has_compact_flash == 0) {
sprintf( summary->text, _("Camera appears to not be using CompactFlash storage\n"
"Unfortunately we do not support that at the moment :-(\n"));
@@ -613,7 +613,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
* Nevertheless, this is a 0.80 Megapixel camera, no more !!! No matter
* what the marketing says!
*/
-
+
info->preview.fields = GP_FILE_INFO_TYPE;
strcpy( info->preview.type, GP_MIME_PPM);
info->preview.width = 128;
diff --git a/camlibs/aox/aox.c b/camlibs/aox/aox.c
index 3ef847b11..f81e2f209 100644
--- a/camlibs/aox/aox.c
+++ b/camlibs/aox/aox.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -30,13 +30,13 @@
#include "aox.h"
-#define GP_MODULE "aox"
+#define GP_MODULE "aox"
#define WRITE gp_port_usb_msg_write
#define READ gp_port_usb_msg_read
-int aox_init (GPPort *port, Model *model, Info *info)
+int aox_init (GPPort *port, Model *model, Info *info)
{
char c[16];
unsigned char hi[2];
@@ -49,19 +49,19 @@ int aox_init (GPPort *port, Model *model, Info *info)
READ(port, 1, 0, 0, c,0x10);
WRITE(port, 8, 1, 0, c, 0x10);
- READ(port, 0xff, 0x07, 0xfffc, c, 4); /* Returns version number, apparently */
- READ(port, 0x06, 0x0, 0x0, c, 2);
- READ(port, 0x04, 0x1, 0x1, (char *)lo, 2);
- GP_DEBUG("%02x %02x number of lo-res pics\n", lo[0],lo[1]);
- /* We need to keep this information. We presume that
- * more than 255 pictures is impossible with this camera.
+ READ(port, 0xff, 0x07, 0xfffc, c, 4); /* Returns version number, apparently */
+ READ(port, 0x06, 0x0, 0x0, c, 2);
+ READ(port, 0x04, 0x1, 0x1, (char *)lo, 2);
+ GP_DEBUG("%02x %02x number of lo-res pics\n", lo[0],lo[1]);
+ /* We need to keep this information. We presume that
+ * more than 255 pictures is impossible with this camera.
*/
memcpy (info, &lo[0], 1);
- READ(port, 0x04, 0x2, 0x1, c, 2);
- READ(port, 0x04, 0x3, 0x1, c, 2);
- READ(port, 0x04, 0x4, 0x1, c, 2);
- READ(port, 0x04, 0x5, 0x1, (char *)hi, 2);
- GP_DEBUG("%02i %02i number of hi-res pics\n", hi[0], hi[1]);
+ READ(port, 0x04, 0x2, 0x1, c, 2);
+ READ(port, 0x04, 0x3, 0x1, c, 2);
+ READ(port, 0x04, 0x4, 0x1, c, 2);
+ READ(port, 0x04, 0x5, 0x1, (char *)hi, 2);
+ GP_DEBUG("%02i %02i number of hi-res pics\n", hi[0], hi[1]);
/* This information, too. */
memcpy (info +1, &hi[0], 1);
READ(port, 0x04, 0x6, 0x1, c, 2); /* "Completion" flag.*/
@@ -73,19 +73,19 @@ int aox_init (GPPort *port, Model *model, Info *info)
}
-int aox_get_num_lo_pics (Info *info)
+int aox_get_num_lo_pics (Info *info)
{
GP_DEBUG("Running aox_get_num_lo_pics\n");
return info[0];
}
-
-int aox_get_num_hi_pics (Info *info)
+
+int aox_get_num_hi_pics (Info *info)
{
GP_DEBUG("Running aox_get_num_hi_pics\n");
return info[1];
}
-int aox_get_picture_size (GPPort *port, int lo, int hi, int n, int k)
+int aox_get_picture_size (GPPort *port, int lo, int hi, int n, int k)
{
unsigned char c[4];
@@ -95,22 +95,22 @@ int aox_get_picture_size (GPPort *port, int lo, int hi, int n, int k)
GP_DEBUG("Running aox_get_picture_size for aox_pic%03i\n", k+1);
if ( ( (lo) && ( n ==k ) && (k ==0)) ) {
- READ(port, 0x04, 0x1, 0x1, (char *)c, 2);
+ READ(port, 0x04, 0x1, 0x1, (char *)c, 2);
}
if ( ( (hi) && ( n < k ) && (n == 0)) ) {
- READ(port, 0x04, 0x5, 0x1, (char *)c, 2);
+ READ(port, 0x04, 0x5, 0x1, (char *)c, 2);
}
- READ(port, 0x05, n+1, 0x1, (char *)c, 4);
+ READ(port, 0x05, n+1, 0x1, (char *)c, 4);
size = (int)c[0] + (int)c[1]*0x100 + (int)c[2]*0x10000;
GP_DEBUG(" size of picture %i is 0x%x\n", k, size);
- if ( (size >= 0xfffff ) ) {return GP_ERROR;}
+ if ( (size >= 0xfffff ) ) {return GP_ERROR;}
GP_DEBUG("Leaving aox_get_picture_size\n");
-
+
return size;
}
-static int aox_read_data (GPPort *port, char *data, int size)
-{
+static int aox_read_data (GPPort *port, char *data, int size)
+{
int MAX_BULK = 0x1000;
while(size > 0) {
@@ -126,8 +126,8 @@ int aox_read_picture_data (GPPort *port, char *data, int size, int n) {
char c[4];
memset(c,0,4);
- READ(port, 0x06, n+1, 0x1, c, 4);
+ READ(port, 0x06, n+1, 0x1, c, 4);
aox_read_data (port, data , size);
-
+
return GP_OK;
}
diff --git a/camlibs/aox/aox.h b/camlibs/aox/aox.h
index 3271326f5..275df3580 100644
--- a/camlibs/aox/aox.h
+++ b/camlibs/aox/aox.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/aox/library.c b/camlibs/aox/library.c
index c1d8515ea..bbbfc2b9b 100644
--- a/camlibs/aox/library.c
+++ b/camlibs/aox/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -63,7 +63,7 @@ static struct {
} models[] = {
{"Concord EyeQMini_1", GP_DRIVER_STATUS_EXPERIMENTAL, 0x03e8, 0x2182},
{"Concord EyeQMini_2", GP_DRIVER_STATUS_EXPERIMENTAL, 0x03e8, 0x2180},
- {"D-MAX DM3588", GP_DRIVER_STATUS_EXPERIMENTAL, 0x03e8, 0x2130},
+ {"D-MAX DM3588", GP_DRIVER_STATUS_EXPERIMENTAL, 0x03e8, 0x2130},
{NULL,0,0,0}
};
@@ -77,7 +77,7 @@ camera_id (CameraText *id)
int
camera_abilities (CameraAbilitiesList *list)
{
- int i;
+ int i;
CameraAbilities a;
for (i = 0; models[i].name; i++) {
@@ -93,7 +93,7 @@ camera_abilities (CameraAbilitiesList *list)
else
a.operations = GP_OPERATION_CAPTURE_IMAGE;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
- a.file_operations = GP_FILE_OPERATION_PREVIEW;
+ a.file_operations = GP_FILE_OPERATION_PREVIEW;
gp_abilities_list_append (list, a);
}
return GP_OK;
@@ -104,13 +104,13 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
{
int num_lo_pics =aox_get_num_lo_pics(camera->pl->info);
- int num_hi_pics =aox_get_num_hi_pics(camera->pl->info);
+ int num_hi_pics =aox_get_num_hi_pics(camera->pl->info);
- sprintf (summary->text,_("Your USB camera has an Aox chipset.\n"
+ sprintf (summary->text,_("Your USB camera has an Aox chipset.\n"
"Number of lo-res PICs = %i\n"
- "Number of hi-res PICs = %i\n"
+ "Number of hi-res PICs = %i\n"
"Number of PICs = %i\n"
- ), num_lo_pics, num_hi_pics, num_lo_pics+num_hi_pics);
+ ), num_lo_pics, num_hi_pics, num_lo_pics+num_hi_pics);
return GP_OK;
}
@@ -130,23 +130,23 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int num_lo_pics = aox_get_num_lo_pics (camera->pl->info);
int num_hi_pics = aox_get_num_hi_pics (camera->pl->info);
int n = num_hi_pics + num_lo_pics;
char name[30];
- int i;
- /* Low-resolution pictures are always downloaded first. We do not know
+ int i;
+ /* Low-resolution pictures are always downloaded first. We do not know
* yet how to process them, so they will remain in RAW format. */
-
+
for (i=0; i< num_lo_pics; i++){
snprintf( name, sizeof(name), "aox_pic%03i.raw", i+1 );
- gp_list_append(list, name, NULL);
+ gp_list_append(list, name, NULL);
}
for (i = num_lo_pics; i < n; i++){
- snprintf( name, sizeof(name), "aox_pic%03i.ppm", i+1 );
- gp_list_append(list, name, NULL);
+ snprintf( name, sizeof(name), "aox_pic%03i.ppm", i+1 );
+ gp_list_append(list, name, NULL);
}
return GP_OK;
}
@@ -156,24 +156,24 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *user_data,
GPContext *context)
{
- Camera *camera = user_data;
+ Camera *camera = user_data;
/* The camera will always download the low-resolution pictures first, if any.
- * As those are compressed, they are not of fixed size. Unfortunately, the
- * compression method is not known.
- * For a high-resolution picture, the size is always the same.
+ * As those are compressed, they are not of fixed size. Unfortunately, the
+ * compression method is not known.
+ * For a high-resolution picture, the size is always the same.
* Every picture file has a header, which is of length 0x98. The high-
- * resolution pictures are just Bayer data; their headers will be discarded.
+ * resolution pictures are just Bayer data; their headers will be discarded.
*/
- int i, j, k, n, num_lo_pics, num_hi_pics, w = 0, h = 0;
+ int i, j, k, n, num_lo_pics, num_hi_pics, w = 0, h = 0;
unsigned char temp;
unsigned char *data;
unsigned char *p_data = NULL;
- unsigned char *output = NULL;
+ unsigned char *output = NULL;
int len;
int header_len;
- char header[128];
+ char header[128];
unsigned char gtable[256];
k = gp_filesystem_number(camera->fs, "/", filename, context);
@@ -186,17 +186,17 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
GP_DEBUG("There are %i compressed photos\n", num_lo_pics);
GP_DEBUG("There are %i hi-res photos\n", num_hi_pics);
- if ( (k < num_lo_pics) ) {
- n = k;
+ if ( (k < num_lo_pics) ) {
+ n = k;
w = 320;
h = 240;
} else {
n = k - num_lo_pics;
- w = 640;
+ w = 640;
h = 480;
}
- len = aox_get_picture_size (camera->port, num_lo_pics,
+ len = aox_get_picture_size (camera->port, num_lo_pics,
num_hi_pics, n, k);
if (len < GP_OK) return len;
@@ -230,13 +230,13 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
p_data = data + 0x98;
/* Picture is mirror-imaged.*/
for (i = 0; i < h; ++i) {
- for (j = 0 ; j < w/2; j++) {
+ for (j = 0 ; j < w/2; j++) {
temp = p_data[w*i +j];
p_data[w*i +j] = p_data[w*i+ w -1 -j];
p_data[w*i + w - 1 - j] = temp;
}
- }
- /* Not only this, but some columns are
+ }
+ /* Not only this, but some columns are
* interchanged, too. */
for (i = 0; i < w*h/4; i++) {
temp = p_data[4*i +1];
@@ -244,22 +244,22 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
p_data[4*i+2] = temp;
}
/* And now create a ppm file, with our own header */
- header_len = snprintf(header, 127,
- "P6\n"
- "# CREATOR: gphoto2, aox library\n"
- "%d %d\n"
+ header_len = snprintf(header, 127,
+ "P6\n"
+ "# CREATOR: gphoto2, aox library\n"
+ "%d %d\n"
"255\n", w, h);
output = malloc(3*w*h);
if(!output) {
free(output);
return GP_ERROR_NO_MEMORY;
- }
+ }
if (camera->pl->model == AOX_MODEL_DMAX)
- gp_bayer_decode (p_data, w, h,
+ gp_bayer_decode (p_data, w, h,
output, BAYER_TILE_RGGB);
else
- gp_bayer_decode (p_data, w, h,
+ gp_bayer_decode (p_data, w, h,
output, BAYER_TILE_GRBG);
/* gamma correction of .70 may not be optimal. */
gp_gamma_fill_table (gtable, .65);
@@ -278,7 +278,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
break;
default:
free (data);
- return (GP_ERROR_NOT_SUPPORTED);
+ return (GP_ERROR_NOT_SUPPORTED);
}
return GP_OK;
}
@@ -301,7 +301,7 @@ camera_exit (Camera *camera, GPContext *context)
static CameraFilesystemFuncs fsfuncs = {
.file_list_func = file_list_func,
.get_file_func = get_file_func
-};
+};
int
camera_init(Camera *camera, GPContext *context)
@@ -317,10 +317,10 @@ camera_init(Camera *camera, GPContext *context)
GP_DEBUG ("Initializing the camera\n");
ret = gp_port_get_settings(camera->port,&settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
- ret = gp_camera_get_abilities(camera,&abilities);
- if (ret < 0) return ret;
+ ret = gp_camera_get_abilities(camera,&abilities);
+ if (ret < 0) return ret;
GP_DEBUG("product number is 0x%x\n", abilities.usb_product);
switch (camera->port->type) {
@@ -338,10 +338,10 @@ camera_init(Camera *camera, GPContext *context)
}
ret = gp_port_set_settings(camera->port,settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
GP_DEBUG("interface = %i\n", settings.usb.interface);
- GP_DEBUG("inep = %x\n", settings.usb.inep);
+ GP_DEBUG("inep = %x\n", settings.usb.inep);
GP_DEBUG("outep = %x\n", settings.usb.outep);
/* Tell the CameraFilesystem where to get lists from */
diff --git a/camlibs/ax203/ax203.c b/camlibs/ax203/ax203.c
index 357e3eb8f..c63f01eff 100644
--- a/camlibs/ax203/ax203.c
+++ b/camlibs/ax203/ax203.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -80,7 +80,7 @@ static const struct eeprom_info {
{ "MXIC MX25L8005A", 0xc21420c2, 1048576, 1 },
{ "MXIC MX25L1605A", 0xc21520c2, 2097152, 1 },
- { "Nantronics N25S80", 0xd51430d5, 1048576, 1 },
+ { "Nantronics N25S80", 0xd51430d5, 1048576, 1 },
{ "PMC Pm25LV010", 0x007e9d7f, 524288, 0 },
@@ -268,9 +268,9 @@ ax203_set_time_and_date(Camera *camera, struct tm *t)
char cmd_buffer[16];
memset (cmd_buffer, 0, sizeof (cmd_buffer));
-
+
cmd_buffer[0] = AX203_SET_TIME;
-
+
cmd_buffer[5] = t->tm_year % 100;
switch (camera->pl->frame_version) {
@@ -319,12 +319,12 @@ static int
ax203_eeprom_read(Camera *camera, int address, char *buf, int buf_size)
{
char cmd[4];
-
+
cmd[0] = SPI_EEPROM_READ;
cmd[1] = (address >> 16) & 0xff;
cmd[2] = (address >> 8) & 0xff;
cmd[3] = (address) & 0xff;
-
+
return ax203_send_eeprom_cmd (camera, 0, cmd, sizeof(cmd), buf,
buf_size, 0);
}
@@ -339,7 +339,7 @@ ax203_eeprom_program_page(Camera *camera, int address, char *buf, int buf_size,
cmd[1] = (address >> 16) & 0xff;
cmd[2] = (address >> 8) & 0xff;
cmd[3] = (address) & 0xff;
-
+
return ax203_send_eeprom_cmd (camera, 1, cmd, sizeof(cmd), buf,
buf_size, extra_arg);
}
@@ -372,7 +372,7 @@ ax203_eeprom_erase_4k_sector(Camera *camera, int address)
cmd[1] = (address >> 16) & 0xff;
cmd[2] = (address >> 8) & 0xff;
cmd[3] = (address) & 0xff;
-
+
return ax203_send_eeprom_cmd (camera, 1, cmd, sizeof(cmd), NULL, 0, 0);
}
@@ -385,7 +385,7 @@ ax203_eeprom_erase_64k_sector(Camera *camera, int address)
cmd[1] = (address >> 16) & 0xff;
cmd[2] = (address >> 8) & 0xff;
cmd[3] = (address) & 0xff;
-
+
return ax203_send_eeprom_cmd (camera, 1, cmd, sizeof(cmd), NULL, 0, 0);
}
@@ -782,7 +782,7 @@ ax203_filesize(Camera *camera)
return 0;
}
/* Never reached */
- return GP_ERROR_NOT_SUPPORTED;
+ return GP_ERROR_NOT_SUPPORTED;
}
static int
@@ -800,7 +800,7 @@ ax203_max_filecount(Camera *camera)
sizeof(struct ax3003_v3_5_x_raw_fileinfo);
}
/* Never reached */
- return GP_ERROR_NOT_SUPPORTED;
+ return GP_ERROR_NOT_SUPPORTED;
}
static int
@@ -905,7 +905,7 @@ int ax206_read_v3_5_x_fileinfo(Camera *camera, int idx,
fileinfo->address = le32toh (raw.address);
fileinfo->size = le16toh (raw.size);
- return GP_OK;
+ return GP_OK;
}
static
@@ -1039,7 +1039,7 @@ int ax203_read_fileinfo(Camera *camera, int idx,
return ax3003_read_v3_5_x_fileinfo (camera, idx, fileinfo);
}
/* Never reached */
- return GP_ERROR_NOT_SUPPORTED;
+ return GP_ERROR_NOT_SUPPORTED;
}
static
@@ -1057,14 +1057,14 @@ int ax203_write_fileinfo(Camera *camera, int idx,
return ax3003_write_v3_5_x_fileinfo (camera, idx, fileinfo);
}
/* Never reached */
- return GP_ERROR_NOT_SUPPORTED;
+ return GP_ERROR_NOT_SUPPORTED;
}
int
ax203_file_present(Camera *camera, int idx)
{
struct ax203_fileinfo fileinfo;
-
+
CHECK (ax203_read_fileinfo (camera, idx, &fileinfo))
return fileinfo.present;
@@ -1102,7 +1102,7 @@ ax203_decode_image(Camera *camera, char *src, int src_size, int **dest)
if (!camera->pl->jdec)
return GP_ERROR_NO_MEMORY;
}
-
+
/* Hack for width / heights which are not a multiple of 16 */
if (camera->pl->width % 16 || camera->pl->height % 16) {
width = (camera->pl->width + 15) & ~15;
@@ -1305,7 +1305,7 @@ ax203_defrag_memory(Camera *camera)
/* Delete all pictures from the frame */
ret = ax203_delete_all (camera);
if (ret < 0) goto cleanup;
-
+
/* An last write them back (in one continuous block) */
for (i = 0; i < count; i++) {
if (!fileinfo[i].present)
@@ -1771,7 +1771,7 @@ ax203_open_device(Camera *camera)
if (ax203_eeprom_info[i].id == id)
break;
}
-
+
if (!ax203_eeprom_info[i].name) {
gp_log (GP_LOG_ERROR, "ax203", "unknown eeprom id: %08x", id);
return GP_ERROR_MODEL_NOT_FOUND;
diff --git a/camlibs/ax203/ax203.h b/camlibs/ax203/ax203.h
index adbd54cec..4fc5e611b 100644
--- a/camlibs/ax203/ax203.h
+++ b/camlibs/ax203/ax203.h
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
diff --git a/camlibs/ax203/ax203_compress_jpeg.c b/camlibs/ax203/ax203_compress_jpeg.c
index 179bb5c06..50efa9ff5 100644
--- a/camlibs/ax203/ax203_compress_jpeg.c
+++ b/camlibs/ax203/ax203_compress_jpeg.c
@@ -14,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -47,7 +47,7 @@ locate_tables_n_write(JOCTET *jpeg, int jpeg_size, JOCTET table_type,
if (jpeg[i] != 0xff) {
gp_log (GP_LOG_ERROR, "ax203",
"marker does not start with ff?");
- return GP_ERROR_CORRUPTED_DATA;
+ return GP_ERROR_CORRUPTED_DATA;
}
if (jpeg[i + 1] == 0xda)
break;
@@ -94,7 +94,7 @@ add_mcu_info(uint8_t *outbuf, int block_nr, int last_Y, int last_Cb,
{
int info_addr = block_nr * 8;
- /* skip header */
+ /* skip header */
huffman_addr -= 16;
info_addr += 16;
@@ -185,7 +185,7 @@ ax206_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
ret = locate_tables_n_write (regular_jpeg, regular_jpeg_size, 0xdb,
outbuf, &outc);
if (ret < 0) return ret;
-
+
/* Locate huffman tables and write them to outbuf */
ret = locate_tables_n_write (regular_jpeg, regular_jpeg_size, 0xc4,
outbuf, &outc);
@@ -195,7 +195,7 @@ ax206_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
DCT coefficients:
1) It wants the MCU huffman data for each new MCU to start on a byte
boundary
- 2) The component order in an MCU is Cb Cr Y, rather then Y Cb Cr
+ 2) The component order in an MCU is Cb Cr Y, rather then Y Cb Cr
We solve both these issues by decompressing the regular jpeg we've
just created into its raw coefficients, following by creating
@@ -228,7 +228,7 @@ ax206_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
#endif
jpeg_set_defaults (&cinfo);
/* We will write Cb values as comp. 0, so give it chroma settings */
- cinfo.comp_info[0].h_samp_factor = 1;
+ cinfo.comp_info[0].h_samp_factor = 1;
cinfo.comp_info[0].v_samp_factor = 1;
cinfo.comp_info[0].quant_tbl_no = 1;
cinfo.comp_info[0].dc_tbl_no = 1;
@@ -329,14 +329,14 @@ ax206_compress_jpeg(Camera *camera, int **in, uint8_t *outbuf, int out_size,
if (i >= buf_size) {
gp_log (GP_LOG_ERROR, "ax203",
"missing in ff da marker?");
- return GP_ERROR_CORRUPTED_DATA;
+ return GP_ERROR_CORRUPTED_DATA;
}
size = buf_size - i - 2;
if ((outc + size) > out_size) {
gp_log (GP_LOG_ERROR, "ax203",
"jpeg output buffer overflow");
- return GP_ERROR_FIXED_LIMIT_EXCEEDED;
+ return GP_ERROR_FIXED_LIMIT_EXCEEDED;
}
outc += copy_huffman(outbuf + outc, buf + i, size);
diff --git a/camlibs/ax203/ax203_decode_yuv.c b/camlibs/ax203/ax203_decode_yuv.c
index e9232d8d5..e07fb874b 100644
--- a/camlibs/ax203/ax203_decode_yuv.c
+++ b/camlibs/ax203/ax203_decode_yuv.c
@@ -14,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
diff --git a/camlibs/ax203/ax203_decode_yuv_delta.c b/camlibs/ax203/ax203_decode_yuv_delta.c
index e0ce42f7d..ed6833044 100644
--- a/camlibs/ax203/ax203_decode_yuv_delta.c
+++ b/camlibs/ax203/ax203_decode_yuv_delta.c
@@ -14,7 +14,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -63,7 +63,7 @@ ax203_decode_component_values(char *src, char *dest)
int i, table, corr;
dest[0] = src[0] & ~0x07;
table = (src[0] >> 1) & 3;
-
+
for (i = 1; i < 4; i++) {
switch (i) {
case 1:
@@ -99,7 +99,7 @@ ax203_decode_block_yuv_delta(char *src, int **dest, int dest_x, int dest_y)
/* The Y components are stored 4 at a time in a pattern like this:
1 2 1 2
3 4 3 4
-
+
1 2 1 2
3 4 3 4 */
for (y = 0; y < 4; y += 2) {
@@ -221,7 +221,7 @@ ax203_encode_signed_component_values(int8_t *src, char *dest)
}
/* If we did not break out the above loop the min / max
correction in the current table is enough */
- if (j == 4)
+ if (j == 4)
break;
}
table = i;
@@ -271,7 +271,7 @@ ax203_encode_unsigned_component_values(uint8_t *src, char *dest)
}
/* If we did not break out the above loop the min / max
correction in the current table is enough */
- if (j == 4)
+ if (j == 4)
break;
}
table = i;
@@ -352,7 +352,7 @@ ax203_encode_block_yuv_delta(int **src, int src_x, int src_y, char *dest)
/* The Y components are stored 4 at a time in a pattern like this:
1 2 1 2
3 4 3 4
-
+
1 2 1 2
3 4 3 4 */
for (y = 0; y < 4; y += 2) {
diff --git a/camlibs/ax203/jpeg_memsrcdest.c b/camlibs/ax203/jpeg_memsrcdest.c
index 561457335..7921713ec 100644
--- a/camlibs/ax203/jpeg_memsrcdest.c
+++ b/camlibs/ax203/jpeg_memsrcdest.c
@@ -213,15 +213,15 @@ init_destination (j_compress_ptr cinfo)
* Empty the output buffer --- called whenever buffer fills up.
*
* In typical applications, this should write the entire output buffer
- * (ignoring the current state of next_output_byte & free_in_buffer),
+ * (ignoring the current state of next_output_byte & free_in_buffer),
* reset the pointer & count to the start of the buffer, and return TRUE
* indicating that the buffer has been dumped.
*
* In applications that need to be able to suspend compression due to output
- * overrun, a FALSE return indicates that the buffer cannot be emptied now.
+ * overrun, a FALSE return indicates that the buffer cannot be emptied now.
* In this situation, the compressor will return to its caller (possibly with
- * an indication that it has not accepted all the supplied scanlines). The
- * application should resume compression after it has made more room in the
+ * an indication that it has not accepted all the supplied scanlines). The
+ * application should resume compression after it has made more room in the
* output buffer. Note that there are substantial restrictions on the use of
* suspension --- see the documentation.
*
@@ -249,7 +249,7 @@ empty_output_buffer (j_compress_ptr cinfo)
}
/*
- * Terminate destination --- called by jpeg_finish_compress
+ * Terminate destination --- called by jpeg_finish_compress
* after all data has been written. Usually needs to flush buffer.
*
* NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
diff --git a/camlibs/ax203/library.c b/camlibs/ax203/library.c
index 6b3636fa0..7e15a20d4 100644
--- a/camlibs/ax203/library.c
+++ b/camlibs/ax203/library.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -81,7 +81,7 @@ camera_abilities (CameraAbilitiesList *list)
a.usb_vendor = ax203_devinfo[i].vendor_id;
a.usb_product= ax203_devinfo[i].product_id;
a.operations = GP_OPERATION_NONE;
- a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
+ a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
GP_FOLDER_OPERATION_DELETE_ALL;
/* FIXME add support for downloading RAW images */
a.file_operations = GP_FILE_OPERATION_DELETE |
@@ -212,7 +212,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
ret = gp_file_set_mime_type (file, GP_MIME_PNG);
if (ret < 0) { gdFree (gdpng); return ret; }
- ret = gp_file_set_name (file, filename);
+ ret = gp_file_set_name (file, filename);
if (ret < 0) { gdFree (gdpng); return ret; }
ret = gp_file_append (file, gdpng, size);
@@ -225,7 +225,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
static int
-put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
+put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
CameraFileType type, CameraFile *file, void *data, GPContext *context)
{
#ifdef HAVE_LIBGD
@@ -360,7 +360,7 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int i, count, present;
char buf[30];
@@ -467,7 +467,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
char buf[2];
@@ -483,7 +483,7 @@ camera_exit (Camera *camera, GPContext *context)
}
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
CameraAbilities a;
int i, ret;
diff --git a/camlibs/ax203/tinyjpeg-internal.h b/camlibs/ax203/tinyjpeg-internal.h
index 271c1e7ff..3b209af21 100644
--- a/camlibs/ax203/tinyjpeg-internal.h
+++ b/camlibs/ax203/tinyjpeg-internal.h
@@ -4,7 +4,7 @@
* *** NOTE: This is a modified version to deal with the ax203 "JPEG" fmt
* *** This version can not decompress regular JPEG files, see
* *** README.ax203-compression for details
- *
+ *
* Copyright (c) 2006, Luc Saillard <luc@saillard.org>
*
* ax203 modifications:
diff --git a/camlibs/ax203/tinyjpeg.c b/camlibs/ax203/tinyjpeg.c
index 866aa567e..205c77950 100644
--- a/camlibs/ax203/tinyjpeg.c
+++ b/camlibs/ax203/tinyjpeg.c
@@ -4,7 +4,7 @@
* *** NOTE: This is a modified version to deal with the ax203 "JPEG" fmt
* *** This version can not decompress regular JPEG files, see
* *** README.ax203-compression for details
- *
+ *
* Copyright (c) 2006, Luc Saillard <luc@saillard.org>
*
* ax203 modifications:
@@ -815,7 +815,7 @@ int tinyjpeg_parse_header(struct jdec_private *priv, const unsigned char *buf, u
stream += 16;
/* Skip MCU info blocks (we don't need them) */
- stream += (priv->width / (8 * priv->component_infos[cY].Hfactor)) *
+ stream += (priv->width / (8 * priv->component_infos[cY].Hfactor)) *
(priv->height / (8 * priv->component_infos[cY].Vfactor)) * 8;
/* Parse DQT table */
diff --git a/camlibs/ax203/tinyjpeg.h b/camlibs/ax203/tinyjpeg.h
index c2b4f004c..f934e4be9 100644
--- a/camlibs/ax203/tinyjpeg.h
+++ b/camlibs/ax203/tinyjpeg.h
@@ -4,7 +4,7 @@
* *** NOTE: This is a modified version to deal with the ax203 "JPEG" fmt
* *** This version can not decompress regular JPEG files, see
* *** README.ax203-compression for details
- *
+ *
* Copyright (c) 2006, Luc Saillard <luc@saillard.org>
*
* ax203 modifications:
diff --git a/camlibs/canon/canon.c b/camlibs/canon/canon.c
index d222ef49d..f748178f7 100644
--- a/camlibs/canon/canon.c
+++ b/camlibs/canon/canon.c
@@ -468,7 +468,7 @@ filename_to_audio(const char *filename, const char __unused__ *newext)
* @camera: Camera to work on
* @filename: the file for which to get the name of the audio annotation
*
- * The identifier returned is
+ * The identifier returned is
* a) NULL if no audio file exists for this file or an internal error occurred
* b) pointer to string with file name of the corresponding thumbnail
* c) pointer to filename in case filename is a thumbnail itself
@@ -510,7 +510,7 @@ canon_int_filename2audioname (Camera __unused__ *camera, const char *filename)
* @camera: Camera to work on
* @filename: the file to get the name of the thumbnail of
*
- * The identifier returned is
+ * The identifier returned is
* a) NULL if no thumbnail exists for this file or an internal error occurred
* b) pointer to empty string if thumbnail is contained in the file itself
* c) pointer to string with file name of the corresponding thumbnail
@@ -659,7 +659,7 @@ canon_int_directory_operations (Camera *camera, const char *path, canonDirFuncti
*
* Gets the camera identification string, usually the owner name.
*
- * This information is then stored in the "camera" structure, which
+ * This information is then stored in the "camera" structure, which
* is a global variable for the driver.
*
* This function also gets the firmware revision in the camera struct.
@@ -919,12 +919,12 @@ canon_int_do_control_command (Camera *camera, unsigned int subcmd, int a, int b)
* response. It also needs an extra zero byte at the
* end. */
payload[payloadlen++] = 0;
- msg = canon_usb_dialogue ( camera,
+ msg = canon_usb_dialogue ( camera,
CANON_USB_FUNCTION_CONTROL_CAMERA_2,
&datalen, payload, payloadlen );
}
else
- msg = canon_usb_dialogue ( camera,
+ msg = canon_usb_dialogue ( camera,
CANON_USB_FUNCTION_CONTROL_CAMERA,
&datalen, payload, payloadlen );
if ( msg == NULL && datalen != 0x1c) {
@@ -948,7 +948,7 @@ canon_int_do_control_command (Camera *camera, unsigned int subcmd, int a, int b)
* @payload: pointer to the payload data buffer to send to the camera
* @payloadlen: length of the payload to send to the camera
* @response_handle: pointer to a pointer where the camera response buffer
- * address should be stored.
+ * address should be stored.
* @datalen: the length of the response data from the camera
*
* Executes a command with arbitrary parameter data that returns data
@@ -962,7 +962,7 @@ canon_int_do_control_command (Camera *camera, unsigned int subcmd, int a, int b)
static int
canon_int_do_control_dialogue_payload (Camera *camera, unsigned char *payload,
unsigned int payloadlen,
- unsigned char **response_handle,
+ unsigned char **response_handle,
unsigned int *datalen)
{
unsigned char *msg;
@@ -974,12 +974,12 @@ canon_int_do_control_dialogue_payload (Camera *camera, unsigned char *payload,
* response. It also needs an extra zero byte at the
* end. */
payload[payloadlen++] = 0;
- msg = canon_usb_dialogue_full ( camera,
+ msg = canon_usb_dialogue_full ( camera,
CANON_USB_FUNCTION_CONTROL_CAMERA_2,
datalen, payload, payloadlen);
}
else
- msg = canon_usb_dialogue_full ( camera,
+ msg = canon_usb_dialogue_full ( camera,
CANON_USB_FUNCTION_CONTROL_CAMERA,
datalen, payload, payloadlen);
@@ -1005,10 +1005,10 @@ canon_int_do_control_dialogue_payload (Camera *camera, unsigned char *payload,
* @a: 32-bit first word of payload (first command parameter)
* @b: 32-bit second word of payload (second command parameter)
* @response_handle: pointer to a pointer where the camera response buffer
- * address should be stored.
+ * address should be stored.
* @datalen: the length of the response data from the camera
*
- * Executes a remote capture command that returns data from the
+ * Executes a remote capture command that returns data from the
* camera, e.g., get release parameters.
*
* Returns: gphoto2 status code, camera response data in @response_handle,
@@ -1029,7 +1029,7 @@ canon_int_do_control_dialogue (Camera *camera, unsigned int subcmd, int a, int b
GP_DEBUG("%s++ with %x, %x", desc, a, b);
status = canon_int_do_control_dialogue_payload (camera, payload,
- payloadlen,
+ payloadlen,
response_handle, datalen);
if ( status < 0 ) {
@@ -1055,14 +1055,14 @@ canon_int_do_control_dialogue (Camera *camera, unsigned int subcmd, int a, int b
* Returns: gphoto2 status code
*
*/
-int
-canon_int_start_remote_control (Camera *camera, GPContext __unused__ *context)
+int
+canon_int_start_remote_control (Camera *camera, GPContext __unused__ *context)
{
int status;
if (camera->pl->remote_control) {
GP_DEBUG ("canon_int_start_remote_control: Camera already under remote control");
- return GP_ERROR;
+ return GP_ERROR;
}
/* Init, extends camera lens, puts us in remote capture mode */
@@ -1070,7 +1070,7 @@ canon_int_start_remote_control (Camera *camera, GPContext __unused__ *context)
CANON_USB_CONTROL_INIT, 0, 0);
- if (status == GP_OK)
+ if (status == GP_OK)
camera->pl->remote_control = 1;
return status;
@@ -1088,8 +1088,8 @@ canon_int_start_remote_control (Camera *camera, GPContext __unused__ *context)
* Returns: gphoto2 status code
*
*/
-int
-canon_int_end_remote_control (Camera *camera, GPContext __unused__ *context)
+int
+canon_int_end_remote_control (Camera *camera, GPContext __unused__ *context)
{
int status;
@@ -1103,7 +1103,7 @@ canon_int_end_remote_control (Camera *camera, GPContext __unused__ *context)
CANON_USB_CONTROL_EXIT, 0, 0);
- if (status == GP_OK)
+ if (status == GP_OK)
camera->pl->remote_control = 0;
return status;
@@ -1138,14 +1138,14 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
unsigned int b_length_orig = 0;
unsigned int *b_length = &b_length_orig;
unsigned char *b_data_orig = NULL;
- unsigned char **b_data = &b_data_orig;
+ unsigned char **b_data = &b_data_orig;
int photo_status;
/* Should we download the thumbnail, or the full image ? */
- if (camera->pl->capture_size == CAPTURE_FULL_IMAGE)
+ if (camera->pl->capture_size == CAPTURE_FULL_IMAGE)
transfermode = REMOTE_CAPTURE_FULL_TO_PC;
- else
+ else
transfermode = REMOTE_CAPTURE_THUMB_TO_PC;
switch (camera->port->type) {
@@ -1156,14 +1156,14 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
camera->pl->image_b_key = 0x0;
camera->pl->image_b_length = 0x0;
-
+
/*
* Send a sequence of CONTROL_CAMERA commands.
*/
if (!camera->pl->remote_control) {
gp_port_set_timeout (camera->port, 15000);
-
+
status = canon_int_start_remote_control (camera, context);
if ( status < 0 )
return status;
@@ -1221,12 +1221,12 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
/* Try to leave camera in a usable state. */
canon_int_end_remote_control (camera, context);
- /* XXX It would be nice if we had a way to
+ /* XXX It would be nice if we had a way to
decode the camera error state for the caller
- application. For example,
+ application. For example,
photo_status == 0x01 seems to mean
"autofocus failure" on the EOS 5D. */
- if (photo_status != 0)
+ if (photo_status != 0)
return GP_ERROR_CAMERA_ERROR;
else
return GP_ERROR_OS_FAILURE;
@@ -1234,7 +1234,7 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
}
if (transfermode == REMOTE_CAPTURE_FULL_TO_PC) {
-
+
/* Download the image. */
if ( camera->pl->image_length > 0 ) {
status = canon_usb_get_captured_image ( camera, camera->pl->image_key, data, length, context );
@@ -1244,7 +1244,7 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
return status;
}
}
-
+
/* Download the secondary image, if one exists */
if ( camera->pl->image_b_length > 0 ) {
status = canon_usb_get_captured_secondary_image ( camera, camera->pl->image_b_key, b_data, b_length, context );
@@ -1253,15 +1253,15 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
" secondary image download failed, status= %i", status );
return status;
}
-
+
/* Get rid of it */
- /* XXX maybe this should be changed in the future
+ /* XXX maybe this should be changed in the future
* to do something else with it */
free(b_data_orig);
}
-
+
} else if (transfermode == REMOTE_CAPTURE_THUMB_TO_PC) {
-
+
/* Download the thumbnail image. */
if ( camera->pl->thumb_length > 0 ) {
status = canon_usb_get_captured_thumbnail ( camera, camera->pl->image_key, data, length, context );
@@ -1271,9 +1271,9 @@ canon_int_capture_preview (Camera *camera, unsigned char **data, unsigned int *l
return status;
}
}
-
+
}
-
+
break;
case GP_PORT_SERIAL:
return GP_ERROR_NOT_SUPPORTED;
@@ -1473,9 +1473,9 @@ canon_int_capture_image (Camera *camera, CameraFilePath *path,
int photo_status;
/* Should we save the thumbnail, or the full image ? */
- if (camera->pl->capture_size == CAPTURE_THUMB)
+ if (camera->pl->capture_size == CAPTURE_THUMB)
transfermode = REMOTE_CAPTURE_THUMB_TO_DRIVE;
- else
+ else
transfermode = REMOTE_CAPTURE_FULL_TO_DRIVE;
switch (camera->port->type) {
@@ -1611,14 +1611,14 @@ canon_int_capture_image (Camera *camera, CameraFilePath *path,
canon_int_end_remote_control (camera, context);
free ( initial_state );
- /* XXX It would be nice if we had a way to
+ /* XXX It would be nice if we had a way to
decode the camera error state for the caller
- application. For example,
+ application. For example,
photo_status == 0x01 seems to mean
"autofocus failure" on the EOS 5D. */
- if (photo_status != 0)
+ if (photo_status != 0)
return GP_ERROR_CAMERA_ERROR;
- else
+ else
return GP_ERROR_OS_FAILURE;
}
@@ -1720,8 +1720,8 @@ canon_int_set_file_attributes (Camera *camera, const char *file, const char *dir
*
* Reads the camera's release parameters (ISO, aperture, shutter speed, etc)
*
- * Right now this has only been tested on an EOS 5D via USB.
- * Note that the camera must be under USB control via
+ * Right now this has only been tested on an EOS 5D via USB.
+ * Note that the camera must be under USB control via
* canon_int_start_remote_control() before calling this function.
*
* Returns: gphoto2 error code
@@ -1737,7 +1737,7 @@ canon_int_get_release_params (Camera *camera, GPContext *context)
GP_DEBUG ("canon_int_get_release_params()");
- /* canon_int_start_remote_control() must be called before
+ /* canon_int_start_remote_control() must be called before
this function */
if (!camera->pl->remote_control) {
GP_DEBUG ("canon_int_get_release_params: Camera not under USB control");
@@ -1770,36 +1770,36 @@ canon_int_get_release_params (Camera *camera, GPContext *context)
}
- /*
- * 0x5c is the offset to the camera parameters in the
- * get release params response data
+ /*
+ * 0x5c is the offset to the camera parameters in the
+ * get release params response data
*/
- memcpy(camera->pl->release_params, response + 0x5c,
+ memcpy(camera->pl->release_params, response + 0x5c,
sizeof(camera->pl->release_params));
for (i=0;i<sizeof(camera->pl->release_params);i++) {
GP_DEBUG("canon_int_get_release_params: [%d] = 0x%02x", i, camera->pl->release_params[i]);
}
- GP_DEBUG ("canon_int_get_release_params: shutter speed = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: shutter speed = 0x%02x",
camera->pl->release_params[SHUTTERSPEED_INDEX]);
- GP_DEBUG ("canon_int_get_release_params: aperture = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: aperture = 0x%02x",
camera->pl->release_params[APERTURE_INDEX]);
- GP_DEBUG ("canon_int_get_release_params: iso = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: iso = 0x%02x",
camera->pl->release_params[ISO_INDEX]);
- GP_DEBUG ("canon_int_get_release_params: focus mode = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: focus mode = 0x%02x",
camera->pl->release_params[FOCUS_MODE_INDEX]);
- GP_DEBUG ("canon_int_get_release_params: beep mode = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: beep mode = 0x%02x",
camera->pl->release_params[BEEP_INDEX]);
- GP_DEBUG ("canon_int_get_release_params: flash mode = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: flash mode = 0x%02x",
camera->pl->release_params[FLASH_INDEX]);
- GP_DEBUG ("canon_int_get_release_params: exposurebias = 0x%02x",
+ GP_DEBUG ("canon_int_get_release_params: exposurebias = 0x%02x",
camera->pl->release_params[EXPOSUREBIAS_INDEX]);
GP_DEBUG ("canon_int_get_release_params: shooting mode = 0x%02x",
@@ -1809,13 +1809,13 @@ canon_int_get_release_params (Camera *camera, GPContext *context)
camera->pl->secondary_image = 0;
/* Based on the image format settings in the release params,
determine whether we expect one or two images to be returned
- by the camera.
- I am not sure if this will work correctly for non-EOS 5D
+ by the camera.
+ I am not sure if this will work correctly for non-EOS 5D
cameras - I would appreciate testing feedback from other
- Canon camera users. To test try capturing an image
- to the host computer in a single format (e.g., RAW or Large Fine
- JPEG). Also try capturing an image when the camera is set to
- a dual format, e.g., RAW + Large Fine JPEG. Note that currently, we
+ Canon camera users. To test try capturing an image
+ to the host computer in a single format (e.g., RAW or Large Fine
+ JPEG). Also try capturing an image when the camera is set to
+ a dual format, e.g., RAW + Large Fine JPEG. Note that currently, we
only save the primary image to disk.
Thanks - <paul@booyaka.com>
*/
@@ -1829,7 +1829,7 @@ canon_int_get_release_params (Camera *camera, GPContext *context)
/**
* canon_int_set_shutter_speed
* @camera: camera to work with
- * @shutter_speed: shutter speed - use one of the defines such as
+ * @shutter_speed: shutter speed - use one of the defines such as
* SHUTTER_SPEED_1_15 for 1/15th of a second, etc.
* @context: context for error reporting
*
@@ -1848,51 +1848,51 @@ canon_int_set_shutter_speed (Camera *camera, canonShutterSpeedState shutter_spee
shutter_speed);
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
/* Modify the shutter speed */
-
+
/* XXX must test for valid shutter speeds here */
camera->pl->release_params[SHUTTERSPEED_INDEX] = shutter_speed;
-
+
/* Upload the shutter speed to the camera */
status = canon_int_set_release_params (camera, context);
if (status < 0)
return status;
-
+
/* Make sure the camera changed it! */
-
+
status = canon_int_get_release_params (camera, context);
if (status < 0)
return status;
-
+
if (camera->pl->release_params[SHUTTERSPEED_INDEX] != shutter_speed) {
GP_DEBUG ("canon_int_set_shutter_speed: Could not set shutter "
- "speed to 0x%02x (camera returned 0x%02x)",
- shutter_speed,
+ "speed to 0x%02x (camera returned 0x%02x)",
+ shutter_speed,
camera->pl->release_params[SHUTTERSPEED_INDEX]);
return GP_ERROR_NOT_SUPPORTED;
} else {
GP_DEBUG ("canon_int_set_shutter_speed: shutter speed change verified");
}
-
+
GP_DEBUG ("canon_int_set_shutter_speed() finished successfully");
- return GP_OK;
+ return GP_OK;
}
/**
* canon_int_set_beep
* @camera: camera to work with
- * @beep_mode: beep mode - use one of the defines such as
+ * @beep_mode: beep mode - use one of the defines such as
* BEEP_ON for turning on the beep when the camera sets the focus.
* @context: context for error reporting
*
@@ -1911,49 +1911,49 @@ canon_int_set_beep (Camera *camera, canonBeepMode beep_mode,
beep_mode);
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
/* Modify the beep mode */
-
+
/* XXX must test for valid shutter speeds here */
camera->pl->release_params[BEEP_INDEX] = beep_mode;
-
+
/* Upload the beep mode to the camera */
status = canon_int_set_release_params (camera, context);
if (status < 0)
return status;
-
+
/* Make sure the camera changed it! */
-
+
status = canon_int_get_release_params (camera, context);
if (status < 0)
return status;
-
+
if (camera->pl->release_params[BEEP_INDEX] != beep_mode) {
GP_DEBUG ("canon_int_set_beep: Could not set beep "
- "mode to 0x%02x (camera returned 0x%02x)",
+ "mode to 0x%02x (camera returned 0x%02x)",
beep_mode,
camera->pl->release_params[BEEP_INDEX]);
return GP_ERROR_NOT_SUPPORTED;
} else {
GP_DEBUG ("canon_int_set_beep: beep mode change verified");
}
-
+
GP_DEBUG ("canon_int_set_beep() finished successfully");
- return GP_OK;
+ return GP_OK;
}
/**
* canon_int_set_flash
* @camera: camera to work with
- * @flash_mode: flash mode - use one of the defines such as
+ * @flash_mode: flash mode - use one of the defines such as
* FLASH_MODE_OFF for turning off the flash.
* @context: context for error reporting
*
@@ -1972,43 +1972,43 @@ canon_int_set_flash (Camera *camera, canonFlashMode flash_mode,
flash_mode);
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
/* Modify the beep mode */
-
+
/* XXX must test for valid flash mode here */
camera->pl->release_params[FLASH_INDEX] = flash_mode;
-
+
/* Upload the flash mode to the camera */
status = canon_int_set_release_params (camera, context);
if (status < 0)
return status;
-
+
/* Make sure the camera changed it! */
-
+
status = canon_int_get_release_params (camera, context);
if (status < 0)
return status;
-
+
if (camera->pl->release_params[FLASH_INDEX] != flash_mode) {
GP_DEBUG ("canon_int_set_flash: Could not set flash "
- "mode to 0x%02x (camera returned 0x%02x)",
+ "mode to 0x%02x (camera returned 0x%02x)",
flash_mode,
camera->pl->release_params[FLASH_INDEX]);
return GP_ERROR_NOT_SUPPORTED;
} else {
GP_DEBUG ("canon_int_set_flash: flash mode change verified");
}
-
+
GP_DEBUG ("canon_int_set_flash() finished successfully");
- return GP_OK;
+ return GP_OK;
}
@@ -2031,15 +2031,15 @@ canon_int_set_zoom (Camera *camera, unsigned char zoom_level,
GP_DEBUG ("canon_int_set_zoom() called for zoom 0x%02x",
zoom_level);
-
+
status = canon_int_do_control_command( camera, CANON_USB_CONTROL_SET_ZOOM_POS, 0x04, zoom_level );
if (status < 0)
return status;
-
+
GP_DEBUG ("canon_int_set_zoom() finished successfully");
- return GP_OK;
+ return GP_OK;
}
@@ -2124,7 +2124,7 @@ canon_int_get_zoom (Camera *camera,
*/
int
canon_int_set_image_format (Camera *camera, unsigned char res_byte1,
- unsigned char res_byte2, unsigned char res_byte3,
+ unsigned char res_byte2, unsigned char res_byte3,
GPContext *context)
{
int status;
@@ -2132,45 +2132,45 @@ canon_int_set_image_format (Camera *camera, unsigned char res_byte1,
GP_DEBUG ("canon_int_set_image_format() called");
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
-
+
/* Modify the image format */
camera->pl->release_params[IMAGE_FORMAT_1_INDEX] = res_byte1;
camera->pl->release_params[IMAGE_FORMAT_2_INDEX] = res_byte2;
camera->pl->release_params[IMAGE_FORMAT_3_INDEX] = res_byte3;
-
+
/* Upload the image_format to the camera */
status = canon_int_set_release_params (camera, context);
-
+
if (status < 0)
return status;
-
- /* It seems to take the camera body a while to change this parameter
- when all three res_bytes are changed at once.
+
+ /* It seems to take the camera body a while to change this parameter
+ when all three res_bytes are changed at once.
So, give the camera a chance to catch up.
- 3750 us was occasionally too short, but 5000 us seems to
+ 3750 us was occasionally too short, but 5000 us seems to
work well. */
usleep(5000);
/* Make sure the camera changed it! */
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
-
+
if (camera->pl->release_params[IMAGE_FORMAT_1_INDEX] != res_byte1 ||
camera->pl->release_params[IMAGE_FORMAT_2_INDEX] != res_byte2 ||
camera->pl->release_params[IMAGE_FORMAT_3_INDEX] != res_byte3) {
GP_DEBUG ("canon_int_set_image_format: Could not set image format "
- "to 0x%02x 0x%02x 0x%02x (camera returned 0x%02x 0x%02x 0x%02x)",
- res_byte1, res_byte2, res_byte3,
+ "to 0x%02x 0x%02x 0x%02x (camera returned 0x%02x 0x%02x 0x%02x)",
+ res_byte1, res_byte2, res_byte3,
camera->pl->release_params[IMAGE_FORMAT_1_INDEX],
camera->pl->release_params[IMAGE_FORMAT_2_INDEX],
camera->pl->release_params[IMAGE_FORMAT_3_INDEX]);
@@ -2178,17 +2178,17 @@ canon_int_set_image_format (Camera *camera, unsigned char res_byte1,
} else {
GP_DEBUG ("canon_int_set_image_format: image_format change verified");
}
-
+
GP_DEBUG ("canon_int_set_image_format() finished successfully");
- return GP_OK;
+ return GP_OK;
}
/**
* canon_int_set_iso
* @camera: camera to work with
- * @iso: ISO - use one of the defines such as ISO_400, etc.
+ * @iso: ISO - use one of the defines such as ISO_400, etc.
* @context: context for error reporting
*
* Sets the camera's ISO speed. Only tested for EOS 5D via USB.
@@ -2205,41 +2205,41 @@ canon_int_set_iso (Camera *camera, canonIsoState iso,
GP_DEBUG ("canon_int_set_iso() called for ISO 0x%02x", iso);
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
/* Modify the ISO */
-
+
camera->pl->release_params[ISO_INDEX] = iso;
-
+
/* Upload the ISO to the camera */
status = canon_int_set_release_params (camera, context);
-
+
if (status < 0)
return status;
-
+
/* Make sure the camera changed it! */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
-
+
if (camera->pl->release_params[ISO_INDEX] != iso) {
GP_DEBUG ("canon_int_set_iso: Could not set ISO "
- "to 0x%02x (camera returned 0x%02x)",
+ "to 0x%02x (camera returned 0x%02x)",
iso, camera->pl->release_params[ISO_INDEX]);
return GP_ERROR_CORRUPTED_DATA;
} else {
GP_DEBUG ("canon_int_set_iso: ISO change verified");
}
-
+
GP_DEBUG ("canon_int_set_iso() finished successfully");
- return GP_OK;
+ return GP_OK;
}
@@ -2292,7 +2292,7 @@ canon_int_set_shooting_mode (Camera *camera, unsigned char shooting_mode,
/**
* canon_int_set_aperture
* @camera: camera to work with
- * @aperture: use one of the defines such as APERTURE_F5_6, etc.
+ * @aperture: use one of the defines such as APERTURE_F5_6, etc.
* @context: context for error reporting
*
* Sets the camera's aperture. Only tested for EOS 5D via USB.
@@ -2310,42 +2310,42 @@ canon_int_set_aperture (Camera *camera, canonApertureState aperture,
aperture);
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
/* Modify the aperture */
-
+
camera->pl->release_params[APERTURE_INDEX] = aperture;
-
+
/* Upload the aperture to the camera */
status = canon_int_set_release_params (camera, context);
if (status < 0)
return status;
-
+
/* Make sure the camera changed it! */
-
+
status = canon_int_get_release_params (camera, context);
if (status < 0)
return status;
-
+
if (camera->pl->release_params[APERTURE_INDEX] != aperture) {
GP_DEBUG ("canon_int_set_aperture: Could not set aperture "
- "to 0x%02x (camera returned 0x%02x)",
- aperture,
+ "to 0x%02x (camera returned 0x%02x)",
+ aperture,
camera->pl->release_params[APERTURE_INDEX]);
return GP_ERROR_CORRUPTED_DATA;
} else {
GP_DEBUG ("canon_int_set_aperture: aperture change verified");
}
-
+
GP_DEBUG ("canon_int_set_aperture() finished successfully");
- return GP_OK;
+ return GP_OK;
}
@@ -2383,25 +2383,25 @@ canon_int_set_exposurebias (Camera *camera, unsigned char expbias,
return status;
if (camera->pl->release_params[EXPOSUREBIAS_INDEX] != expbias) {
GP_DEBUG ("canon_int_set_exposurebias: Could not set exposure bias "
- "to 0x%02x (camera returned 0x%02x)",
- expbias,
+ "to 0x%02x (camera returned 0x%02x)",
+ expbias,
camera->pl->release_params[EXPOSUREBIAS_INDEX]);
return GP_ERROR_CORRUPTED_DATA;
} else {
GP_DEBUG ("canon_int_set_exposurebias: expbias change verified");
}
GP_DEBUG ("canon_int_set_exposurebias() finished successfully");
- return GP_OK;
+ return GP_OK;
}
/**
* canon_int_set_focus_mode
* @camera: camera to work with
- * @focus_mode: use one of the defines such as AUTO_FOCUS_AI_SERVO, etc.
+ * @focus_mode: use one of the defines such as AUTO_FOCUS_AI_SERVO, etc.
* @context: context for error reporting
*
- * Sets the camera's focus mode. Note that the selection of focus modes is
+ * Sets the camera's focus mode. Note that the selection of focus modes is
* limited by the AF/MF switch on the lens body. In particular, this function
* is only useful for switching between the various autofocus modes while the
* lens focus switch is set to 'AF'. Only tested for EOS 5D via USB.
@@ -2419,43 +2419,43 @@ canon_int_set_focus_mode (Camera *camera, canonFocusModeState focus_mode,
focus_mode);
/* Get the current camera settings */
-
+
status = canon_int_get_release_params (camera, context);
-
+
if (status < 0)
return status;
/* Modify the focus mode */
-
+
camera->pl->release_params[FOCUS_MODE_INDEX] = focus_mode;
-
+
/* Upload the focus mode to the camera */
status = canon_int_set_release_params (camera, context);
if (status < 0)
return status;
-
+
/* Make sure the camera changed it! */
-
+
status = canon_int_get_release_params (camera, context);
if (status < 0)
return status;
-
+
if (camera->pl->release_params[FOCUS_MODE_INDEX] != focus_mode) {
GP_DEBUG ("canon_int_set_focus_mode: Could not set focus_mode "
- "to 0x%02x (camera returned 0x%02x)",
- focus_mode,
+ "to 0x%02x (camera returned 0x%02x)",
+ focus_mode,
camera->pl->release_params[FOCUS_MODE_INDEX]);
return GP_ERROR_CORRUPTED_DATA;
} else {
GP_DEBUG ("canon_int_set_focus_mode: focus_mode change verified");
}
-
+
GP_DEBUG ("canon_int_set_focus_mode() finished successfully");
- return GP_OK;
+ return GP_OK;
}
/**
@@ -2481,29 +2481,29 @@ canon_int_set_release_params (Camera *camera, GPContext *context)
if (!camera->pl->remote_control) {
GP_DEBUG ("canon_int_set_release_params: Camera not under USB control");
- return GP_ERROR;
+ return GP_ERROR;
}
memset(payload, 0, sizeof(payload));
switch (camera->port->type) {
case GP_PORT_USB:
- /* This is what we need for Canon class 6 cameras -
+ /* This is what we need for Canon class 6 cameras -
not sure what it is for previous protocols */
- payload[0x0] = CANON_USB_CONTROL_SET_ZOOM_POS;
+ payload[0x0] = CANON_USB_CONTROL_SET_ZOOM_POS;
payload[0x4] = 0x30;
/* Copy the release parameter block from the camera state
* structure into the payload. The 0x08 is the byte offset
* into the payload where the release parameters start.
*/
- memcpy(payload + 0x08, camera->pl->release_params,
- sizeof(camera->pl->release_params));
+ memcpy(payload + 0x08, camera->pl->release_params,
+ sizeof(camera->pl->release_params));
payloadlen = RELEASE_PARAMS_LEN + 0x08;
status = canon_int_do_control_dialogue_payload (camera, payload, payloadlen, &msg, &len);
-
+
if ( msg == NULL )
return GP_ERROR_CORRUPTED_DATA;
@@ -2516,12 +2516,12 @@ canon_int_set_release_params (Camera *camera, GPContext *context)
status = canon_int_do_control_dialogue (camera,
CANON_USB_CONTROL_GET_PARAMS,
0x00, 0, &trash_handle, &trash_int);
-
+
if ( status < 0 )
return GP_ERROR;
-
+
status = canon_int_do_control_dialogue_payload (camera, payload, payloadlen, &msg, &len);
if ( msg == NULL )
@@ -2922,12 +2922,12 @@ canon_int_get_disk_name_info (Camera *camera, const char *name, int *capacity, i
"(expected %i got %i)", 0x0c, len);
return GP_ERROR_CORRUPTED_DATA;
}
-
+
/* Capacity and available are not NULL as verified above.
* But cap and ava are only set for the USB case, so we have to check for that.
* If you know the logic better, feel free to improve it. */
switch (camera->port->type) {
- case GP_PORT_USB:
+ case GP_PORT_USB:
*capacity = cap;
*available = ava;
GP_DEBUG ("canon_int_get_disk_name_info: "
@@ -3100,7 +3100,7 @@ debug_fileinfo (CameraFileInfo * info)
* Implicitly assumes that uint8_t[] is a char[] for strings.
*
* A few notes about listing files and camera->pl->list_all_files:
- *
+ *
* If camera->pl->list_all_files is false (intended default), then
* we list only "primary files" or ("main" files). Those are files
* like image files or movie files which the user explicitly created
@@ -3604,7 +3604,7 @@ canon_int_delete_file (Camera *camera, const char *name, const char *dir, GPCont
else if ( le32atoh ( msg ) != 0 ) {
GP_DEBUG ( "canon_int_delete_file: "
"non-zero return code 0x%x from camera. "
- "Possibly tried to delete a nonexistent file.",
+ "Possibly tried to delete a nonexistent file.",
le32atoh ( msg ) );
return GP_ERROR_FILE_NOT_FOUND;
}
diff --git a/camlibs/canon/canon.h b/camlibs/canon/canon.h
index 12d14abe6..a529be8a9 100644
--- a/camlibs/canon/canon.h
+++ b/camlibs/canon/canon.h
@@ -415,7 +415,7 @@ struct canonExposureBiasStateStruct {
#define SELF_TIMER_1_INDEX 0x04 /* Currently not used */
#define SELF_TIMER_2_INDEX 0x05 /* Currently not used */
#define FLASH_INDEX 0x06
-#define BEEP_INDEX 0x07
+#define BEEP_INDEX 0x07
#define FOCUS_MODE_INDEX 0x12
#define ISO_INDEX 0x1a
#define APERTURE_INDEX 0x1c
@@ -426,15 +426,15 @@ struct canonExposureBiasStateStruct {
/**
* canonCaptureSizeClass:
* @CAPTURE_COMPATIBILITY: operate in the traditional gphoto2 mode
- * @CAPTURE_THUMB: capture thumbnails
+ * @CAPTURE_THUMB: capture thumbnails
* @CAPTURE_FULL_IMAGES: capture full-sized images
*
* By default (CAPTURE_COMPATIBILITY mode), the driver will capture
* thumbnails to the host computer in capture_preview, and full-sized
- * images to the camera's drive in capture_image.
- * CAPTURE_FULL_IMAGE will capture a full-sized image to the host
+ * images to the camera's drive in capture_image.
+ * CAPTURE_FULL_IMAGE will capture a full-sized image to the host
* computer in capture_preview, or to the camera's drive in capture_image.
- * CAPTURE_THUMB is likewise intended to capture thumbnails to either
+ * CAPTURE_THUMB is likewise intended to capture thumbnails to either
* the host computer or to the camera's drive, although these modes do not
* seem to work right now.
*
@@ -478,8 +478,8 @@ struct _CameraPrivateLibrary
int receive_error; /* status of transfer on serial connection */
int first_init; /* first use of camera 1 = yes 0 = no */
int uploading; /* 1 = yes ; 0 = no */
- int slow_send; /* to send data via serial with a usleep(1)
- * between each byte 1 = yes ; 0 = no */
+ int slow_send; /* to send data via serial with a usleep(1)
+ * between each byte 1 = yes ; 0 = no */
unsigned char seq_tx;
unsigned char seq_rx;
@@ -489,7 +489,7 @@ struct _CameraPrivateLibrary
*/
int list_all_files; /* whether to list all files, not just know types */
- int upload_keep_filename; /* 0=DCIF compatible filenames (AUT_*),
+ int upload_keep_filename; /* 0=DCIF compatible filenames (AUT_*),
1=keep original filename */
char *cached_drive; /* usually something like C: */
@@ -516,12 +516,12 @@ struct _CameraPrivateLibrary
unsigned int body_id; /* hardware serial number for some cameras */
- unsigned char release_params[RELEASE_PARAMS_LEN]; /* "Release
+ unsigned char release_params[RELEASE_PARAMS_LEN]; /* "Release
parameters:"
- ISO, aperture,
+ ISO, aperture,
etc */
- int secondary_image; /* Should we attempt to download a
+ int secondary_image; /* Should we attempt to download a
secondary image? (e.g., RAW + JPEG) */
/*
@@ -565,14 +565,14 @@ typedef enum {
/**
* canonDirentAttributeBits:
* @CANON_ATTR_WRITE_PROTECTED: File is write-protected
- * @CANON_ATTR_UNKNOWN_2:
- * @CANON_ATTR_UNKNOWN_4:
- * @CANON_ATTR_UNKNOWN_8:
+ * @CANON_ATTR_UNKNOWN_2:
+ * @CANON_ATTR_UNKNOWN_4:
+ * @CANON_ATTR_UNKNOWN_8:
* @CANON_ATTR_NON_RECURS_ENT_DIR: This entry represents a directory
* that was not entered in this listing.
* @CANON_ATTR_NOT_DOWNLOADED: This file has not yet been downloaded
* (the bit is cleared by the host software).
- * @CANON_ATTR_UNKNOWN_40:
+ * @CANON_ATTR_UNKNOWN_40:
* @CANON_ATTR_RECURS_ENT_DIR: This entry represents a directory
* that was entered in this listing; look for its contents
* later in the listing.
@@ -621,7 +621,7 @@ typedef enum {
DIR_REMOVE = 1
} canonDirFunctionCode;
-/* These macros contain the default label for all the
+/* These macros contain the default label for all the
* switch (camera->port->type) statements
*/
diff --git a/camlibs/canon/library.c b/camlibs/canon/library.c
index 6c7df74eb..2699ad1f6 100644
--- a/camlibs/canon/library.c
+++ b/camlibs/canon/library.c
@@ -358,7 +358,7 @@ int camera_id (CameraText *id)
*
*/
static int
-camera_manual (Camera __unused__ *camera, CameraText *manual,
+camera_manual (Camera __unused__ *camera, CameraText *manual,
GPContext __unused__ *context)
{
GP_DEBUG ("camera_manual()");
@@ -532,9 +532,9 @@ camera_exit (Camera *camera, GPContext *context)
{
int res = 0;
- if (camera->port->type == GP_PORT_USB)
+ if (camera->port->type == GP_PORT_USB)
canon_usb_unlock_keys (camera, context);
-
+
/* Turn off remote control if enabled (remote control only
* applies to USB cameras, but in case of serial connection
* remote_control should never be seen set here) */
@@ -690,7 +690,7 @@ update_disk_cache (Camera *camera, GPContext *context)
****************************************************************************/
static int
-file_list_func (CameraFilesystem __unused__ *fs, const char *folder,
+file_list_func (CameraFilesystem __unused__ *fs, const char *folder,
CameraList *list, void *data,
GPContext *context)
{
@@ -701,12 +701,12 @@ file_list_func (CameraFilesystem __unused__ *fs, const char *folder,
if (!check_readiness (camera, context))
return GP_ERROR;
- return canon_int_list_directory (camera, folder, list,
+ return canon_int_list_directory (camera, folder, list,
CANON_LIST_FILES, context);
}
static int
-folder_list_func (CameraFilesystem __unused__ *fs, const char *folder,
+folder_list_func (CameraFilesystem __unused__ *fs, const char *folder,
CameraList *list, void *data,
GPContext *context)
{
@@ -717,13 +717,13 @@ folder_list_func (CameraFilesystem __unused__ *fs, const char *folder,
if (!check_readiness (camera, context))
return GP_ERROR;
- return canon_int_list_directory (camera, folder, list,
+ return canon_int_list_directory (camera, folder, list,
CANON_LIST_FOLDERS, context);
}
static int
get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
- CameraFileType type, CameraFile *file, void *user_data,
+ CameraFileType type, CameraFile *file, void *user_data,
GPContext *context)
{
Camera *camera = user_data;
@@ -1123,12 +1123,12 @@ storage_info_func (
(*sinfos)->access = GP_STORAGEINFO_AC_READONLY_WITH_DELETE;
return GP_OK;
}
-
+
/****************************************************************************/
static int
-camera_about (Camera __unused__ *camera, CameraText *about,
+camera_about (Camera __unused__ *camera, CameraText *about,
GPContext __unused__ *context)
{
GP_DEBUG ("camera_about()");
@@ -1151,7 +1151,7 @@ camera_about (Camera __unused__ *camera, CameraText *about,
/****************************************************************************/
static int
-delete_file_func (CameraFilesystem __unused__ *fs, const char *folder,
+delete_file_func (CameraFilesystem __unused__ *fs, const char *folder,
const char *filename, void *data,
GPContext *context)
{
@@ -1205,10 +1205,10 @@ delete_file_func (CameraFilesystem __unused__ *fs, const char *folder,
#ifdef CANON_EXPERIMENTAL_UPLOAD
/*
* get from the filesystem the name of the highest numbered picture or directory
- *
+ *
*/
static int
-get_last_file (Camera *camera, char *directory, char *destname,
+get_last_file (Camera *camera, char *directory, char *destname,
GPContext* context, char getdirectory, char*result)
{
CameraFilesystem * fs = camera->fs;
@@ -1218,9 +1218,9 @@ get_last_file (Camera *camera, char *directory, char *destname,
GP_DEBUG ("get_last_file()");
if(directory[1] == ':') {
- /* gp_file_list_folder() needs absolute filenames
+ /* gp_file_list_folder() needs absolute filenames
starting with '/' */
- GP_DEBUG ("get_last_file(): replacing '%c:%c' by '/'",
+ GP_DEBUG ("get_last_file(): replacing '%c:%c' by '/'",
directory[0], directory[2]);
sprintf(dir2, "/%s", &directory[3]);
directory = dir2;
@@ -1238,7 +1238,7 @@ get_last_file (Camera *camera, char *directory, char *destname,
for(t=0;t<list->count;t++)
{
char* name = list->entry[t].name;
- if(getdirectory)
+ if(getdirectory)
GP_DEBUG ("get_last_file(): folder: %s", name);
else
GP_DEBUG ("get_last_file(): file: %s", name);
@@ -1251,7 +1251,7 @@ get_last_file (Camera *camera, char *directory, char *destname,
continue;
/* ...and only for files similar to AUT_[0-9]{4} */
- if(!getdirectory && (!isdigit(name[6]) ||
+ if(!getdirectory && (!isdigit(name[6]) ||
!isdigit(name[7])))
continue;
@@ -1278,9 +1278,9 @@ get_last_dir (Camera *camera, char *directory, char *destname, GPContext* contex
}
/*
- * convert a filename to 8.3 format by truncating
+ * convert a filename to 8.3 format by truncating
* the basename to 8 and the extension to 3 chars
- *
+ *
*/
static void
convert_filename_to_8_3(const char* filename, char* dest)
@@ -1293,7 +1293,7 @@ convert_filename_to_8_3(const char* filename, char* dest)
}
else {
int l = c-filename;
- if(l>8)
+ if(l>8)
l=8;
memcpy(dest, filename, l);
dest[l]=0;
@@ -1457,7 +1457,7 @@ put_file_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder, c
gp_camera_get_abilities (camera, &a);
/* Special case for A50 and Pro 70 */
- if ((camera->pl->speed > 57600) &&
+ if ((camera->pl->speed > 57600) &&
((camera->pl->md->model == CANON_CLASS_1)
|| (camera->pl->md->model == CANON_CLASS_2))) {
gp_context_error (context,
@@ -1550,7 +1550,7 @@ put_file_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder, c
/* Wait for an event */
static int
-camera_wait_for_event (Camera *camera, int timeout, CameraEventType *eventtype, void **eventdata, GPContext *context)
+camera_wait_for_event (Camera *camera, int timeout, CameraEventType *eventtype, void **eventdata, GPContext *context)
{
return canon_int_wait_for_event (camera, timeout, eventtype, eventdata, context);
}
@@ -1602,9 +1602,9 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
+
/* Set to "Compatibility mode" if not currently set */
- if (menuval == -1)
+ if (menuval == -1)
gp_widget_set_value (t, _("Compatibility Mode"));
gp_widget_append (section, t);
@@ -1615,7 +1615,7 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
/* Necessary for release params: ISO, aperture, etc. */
if (!camera->pl->remote_control) {
res = canon_int_start_remote_control (camera, context);
- if (res != GP_OK)
+ if (res != GP_OK)
return -1;
}
@@ -1642,8 +1642,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown ISO value if the
+
+ /* Set an unknown ISO value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -1696,8 +1696,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown shutter value if the
+
+ /* Set an unknown shutter value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -1736,8 +1736,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown aperture value if the
+
+ /* Set an unknown aperture value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -1763,8 +1763,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown exp bias value if the
+
+ /* Set an unknown exp bias value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -1794,7 +1794,7 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
+
/* Set an unknown imageFormat value if the
* camera is set to something weird */
if (menuval == -1) {
@@ -1822,8 +1822,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown focus mode value if the
+
+ /* Set an unknown focus mode value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -1850,8 +1850,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown flash value if the
+
+ /* Set an unknown flash value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -1878,8 +1878,8 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
}
i++;
}
-
- /* Set an unknown beep value if the
+
+ /* Set an unknown beep value if the
* camera is set to something weird */
if (menuval == -1) {
gp_widget_add_choice (t, _("Unknown"));
@@ -2013,8 +2013,8 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
}
i++;
}
-
- if (!captureSizeArray[i].label)
+
+ if (!captureSizeArray[i].label)
gp_context_status (context, _("Invalid capture size class setting"));
}
@@ -2187,7 +2187,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
while (imageFormatStateArray[i].label) {
if (strcmp (_(imageFormatStateArray[i].label), wvalue) == 0)
break;
-
+
i++;
}
@@ -2258,7 +2258,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
gp_context_status (context, _("Beep mode changed"));
else
gp_context_status (context, _("Could not change beep mode"));
- }
+ }
}
}
@@ -2279,7 +2279,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
gp_context_status (context, _("Zoom level changed"));
else
gp_context_status (context, _("Could not change zoom level"));
- }
+ }
}
}
@@ -2339,7 +2339,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
gp_context_status (context, _("Flash mode changed"));
else
gp_context_status (context, _("Could not change flash mode"));
- }
+ }
}
}
@@ -2388,9 +2388,9 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
}
static int
-get_info_func (CameraFilesystem __unused__ *fs, const char *folder,
+get_info_func (CameraFilesystem __unused__ *fs, const char *folder,
const char *filename,
- CameraFileInfo * info,
+ CameraFileInfo * info,
void __unused__ *data, GPContext __unused__ *context)
{
Camera *camera = data;
@@ -2452,7 +2452,7 @@ make_dir_func (CameraFilesystem __unused__ *fs, const char *folder,
if (canonpath == NULL)
return GP_ERROR_BAD_PARAMETERS;
- r = canon_int_directory_operations (camera, canonpath,
+ r = canon_int_directory_operations (camera, canonpath,
DIR_CREATE, context);
if (r != GP_OK)
return (r);
@@ -2494,7 +2494,7 @@ remove_dir_func (CameraFilesystem __unused__ *fs, const char *folder,
if (canonpath == NULL)
return GP_ERROR_BAD_PARAMETERS;
- r = canon_int_directory_operations (camera, canonpath,
+ r = canon_int_directory_operations (camera, canonpath,
DIR_REMOVE, context);
if (r != GP_OK)
return (r);
diff --git a/camlibs/canon/ps350/ps350chk.c b/camlibs/canon/ps350/ps350chk.c
index 0db6c5d3e..fd893689b 100644
--- a/camlibs/canon/ps350/ps350chk.c
+++ b/camlibs/canon/ps350/ps350chk.c
@@ -13,7 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the
+ along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
@@ -43,7 +43,7 @@
only saw that when I drew the schematic. There are quite a few
programs available that calculate this CRC, but I didn't understand
most of them, so I wrote my own version for some experiments. (And most
- implementations that I've seen didn't have a clear copyright...)
+ implementations that I've seen didn't have a clear copyright...)
I implemented the 16-stage shift register in a `long' variable
that is shifted and XOR'd when necessary.
diff --git a/camlibs/canon/ps350/renamejpg.c b/camlibs/canon/ps350/renamejpg.c
index 34c15bb7b..43f9520bf 100644
--- a/camlibs/canon/ps350/renamejpg.c
+++ b/camlibs/canon/ps350/renamejpg.c
@@ -26,7 +26,7 @@ void main (int argc, char **argv)
}
for (i=1; i<argc; i++)
- {
+ {
if ((jpgfile = fopen (argv[i], "rb")) == NULL)
{
fprintf (stderr, "File could not be opened. Aborted.\n\n");
@@ -64,7 +64,7 @@ void main (int argc, char **argv)
snprintf(newname, 200, "%s-%d.jpg", tempstring, newnamecounter);
}
- printf("File %s, size %ld, %s -> %s\n", argv[i], statbuf.st_size,
+ printf("File %s, size %ld, %s -> %s\n", argv[i], statbuf.st_size,
timestring, newname);
fclose(jpgfile);
diff --git a/camlibs/canon/serial.c b/camlibs/canon/serial.c
index b175a5408..8fc19b252 100644
--- a/camlibs/canon/serial.c
+++ b/camlibs/canon/serial.c
@@ -349,8 +349,8 @@ canon_serial_recv_frame (Camera *camera, int *len)
/**
* canon_serial_send_packet
* @camera: Camera object to work with
- * @type:
- * @seq:
+ * @type:
+ * @seq:
* @pkt: data to send to camera
* @len: length of data
*
@@ -691,7 +691,7 @@ canon_serial_recv_msg (Camera *camera, unsigned char mtype, unsigned char dir, u
if (type == PKT_ACK && mtype == 0x3 && dir == 0x21) {
GP_DEBUG("ignoring ACK received while waiting for MSG");
return frag;
- }
+ }
*/
if (len < MSG_HDR_LEN || frag[MSG_02] != 2) {
GP_DEBUG ("ERROR: message format error");
@@ -1368,11 +1368,11 @@ canon_serial_ready (Camera *camera, GPContext *context)
* don't actually use id_str, but serial_id_string.
*/
for (i = 0; models[i].id_str != NULL; i++) {
- if ((models[i].serial_id_string != NULL) &&
+ if ((models[i].serial_id_string != NULL) &&
!strcmp (models[i].serial_id_string, cam_id_str)) {
GP_DEBUG ("canon_serial_ready: Serial ID string matches '%s'",
models[i].serial_id_string);
- gp_context_status (context, _("Detected a \"%s\" aka \"%s\""),
+ gp_context_status (context, _("Detected a \"%s\" aka \"%s\""),
models[i].id_str, models[i].serial_id_string);
camera->pl->md = (struct canonCamModelData *) &models[i];
break;
@@ -1478,7 +1478,7 @@ canon_serial_ready (Camera *camera, GPContext *context)
* @context: context for error reporting
*
* This is just the serial specific part extracted from the older
- * canon_get_thumbnail() routine.
+ * canon_get_thumbnail() routine.
*
* Returns: gphoto2 error code
*
diff --git a/camlibs/canon/serial.h b/camlibs/canon/serial.h
index 50b993304..b4daaeed8 100644
--- a/camlibs/canon/serial.h
+++ b/camlibs/canon/serial.h
@@ -145,7 +145,7 @@ typedef enum {
* @PKT_LEN_MSB: Offset in packet to most-significant byte of packet length.
* @PKT_HDR_LEN: Length of complete header.
*
- * Offsets to bytes in a serial packet header.
+ * Offsets to bytes in a serial packet header.
*
*/
typedef enum {
@@ -182,7 +182,7 @@ typedef enum {
} canonPacketType;
-
+
/* #define PKT_NACK 255 */
/* #define PKTACK_NACK 0x01 */
/* #define PKT_UPLOAD_EOT 3 */
diff --git a/camlibs/canon/usb.c b/camlibs/canon/usb.c
index baaf3ea1f..c1d2d5f4a 100644
--- a/camlibs/canon/usb.c
+++ b/camlibs/canon/usb.c
@@ -58,14 +58,14 @@
#define CHECK_RESULT(result) {int r = (result); if (r < 0) return (r);}
-/* IDENTIFY_INIT_TIMEOUT: the starting timeout (in milliseconds)
+/* IDENTIFY_INIT_TIMEOUT: the starting timeout (in milliseconds)
* to wait for the camera to respond to an "identify camera" request.
* This timeout is doubled for each retry */
/* It was originally 10, but this made the communication fail, so
* bump up to 100. */
#define IDENTIFY_INIT_TIMEOUT 100
-/* IDENTIFY_MAX_ATTEMPTS: how many "identify camera" requests to send
+/* IDENTIFY_MAX_ATTEMPTS: how many "identify camera" requests to send
* to the camera, until we give up for lack of response. */
#define IDENTIFY_MAX_ATTEMPTS 5
@@ -379,7 +379,7 @@ canon_usb_camera_init (Camera *camera, GPContext *context)
else
GP_DEBUG ("canon_usb_camera_init() "
"Step #5 of initialization failed! (returned %i, expected %i) "
- "Camera might still work though. Continuing.",
+ "Camera might still work though. Continuing.",
i, 4);
}
}
@@ -460,10 +460,10 @@ int
canon_usb_init (Camera *camera, GPContext *context)
{
/* unsigned char buffer[0x44]; */
- int res, id_retry, i, camstat;
+ int res, id_retry, i, camstat;
/* int read_bytes; */
int orig_mstimeout = -1;
- int id_mstimeout = IDENTIFY_INIT_TIMEOUT; /* separate timeout for
+ int id_mstimeout = IDENTIFY_INIT_TIMEOUT; /* separate timeout for
identify camera */
GP_DEBUG ("Initializing the (USB) camera.");
@@ -480,7 +480,7 @@ canon_usb_init (Camera *camera, GPContext *context)
if ( camstat < 0 )
return camstat;
- /* Save the original timeout value and set up the initial
+ /* Save the original timeout value and set up the initial
identify camera timeout value */
gp_port_get_timeout (camera->port, &orig_mstimeout);
gp_port_set_timeout (camera->port, id_mstimeout);
@@ -533,7 +533,7 @@ canon_usb_init (Camera *camera, GPContext *context)
GP_DEBUG ( "canon_usb_init: camera uses newer protocol, so we get camera abilities" );
c_res = canon_usb_dialogue (camera,
CANON_USB_FUNCTION_GET_PIC_ABILITIES_2,
- &bytes_read, NULL, 0);
+ &bytes_read, NULL, 0);
if ( c_res == NULL ) {
GP_DEBUG ( "canon_usb_init: \"get picture abilities\" failed; continuing anyway." );
@@ -565,7 +565,7 @@ canon_usb_init (Camera *camera, GPContext *context)
if (res != GP_OK) {
gp_context_error (context, _("Camera not ready, get_battery failed: %s"),
gp_result_as_string (res));
- return res;
+ return res;
}
}
@@ -692,7 +692,7 @@ canon_usb_lock_keys (Camera *camera, GPContext *context)
c_res = canon_usb_dialogue (camera,
CANON_USB_FUNCTION_GET_PIC_ABILITIES_2,
- &bytes_read, NULL, 0);
+ &bytes_read, NULL, 0);
if ( c_res == NULL ) {
GP_DEBUG ( "canon_usb_lock_keys: \"get picture abilities\" failed; continuing anyway." );
@@ -784,7 +784,7 @@ canon_usb_unlock_keys (Camera *camera, GPContext *context)
}
else {
/* Your camera model does not need unlocking, cannot do unlocking or
- * we don't know how to unlock its keys.
+ * we don't know how to unlock its keys.
*/
GP_DEBUG ("canon_usb_unlock_keys: Key unlocking not implemented for this camera model. "
"If unlocking works when using the Windows software with your camera, "
@@ -1033,7 +1033,7 @@ canon_usb_capture_dialogue (Camera *camera, unsigned int *return_length, int *ph
GP_DEBUG ("canon_usb_capture_dialogue()");
- *photo_status = 0; /* This should only be checked by the caller
+ *photo_status = 0; /* This should only be checked by the caller
if canon_usb_capture_dialogue() returns null */
/* Build payload for command, which contains subfunction code */
@@ -1083,7 +1083,7 @@ canon_usb_capture_dialogue (Camera *camera, unsigned int *return_length, int *ph
GP_DEBUG ( "canon_usb_capture_dialogue: Issuing unknown command 0x22 for class 6 camera." );
buffer = canon_usb_dialogue ( camera,
CANON_USB_FUNCTION_20D_UNKNOWN_2,
- return_length, payload, 4 );
+ return_length, payload, 4 );
if ( buffer == NULL )
GP_DEBUG ( "canon_usb_capture_dialogue: Unknown command 0x22 returned null buffer; continuing anyway." );
@@ -1154,7 +1154,7 @@ canon_usb_capture_dialogue (Camera *camera, unsigned int *return_length, int *ph
/* (only for RAW + JPEG modes) */
GP_DEBUG ( "canon_usb_capture_dialogue: "
"secondary image descriptor received");
-
+
camera->pl->image_b_length = le32atoh ( buf2+0x11 );
camera->pl->image_b_key = le32atoh ( buf2+0x0c );
@@ -1642,13 +1642,13 @@ canon_usb_dialogue (Camera *camera, canonCommandIndex canon_funct, unsigned int
buffer = canon_usb_dialogue_full (camera, canon_funct, return_length,
payload, payload_length);
-
+
/* Remove the packet header from the response */
if (return_length)
*return_length = *return_length - 0x50;
- if (buffer)
+ if (buffer)
return buffer + 0x50;
- else
+ else
return NULL;
}
@@ -1983,7 +1983,7 @@ canon_usb_get_captured_image (Camera *camera, const int key, unsigned char **dat
* Gets the just-captured image from a USB-connected Canon
* camera. This function must be called soon after an image capture,
* and needs the image key returned by canon_usb_capture_dialogue().
- * This function is only used for "secondary images," e.g., the JPEGs
+ * This function is only used for "secondary images," e.g., the JPEGs
* downloaded when the camera's capture image format mode is set to "RAW + JPEG"
*
* Returns: gphoto2 error code, length in @length, and image data in @data.
@@ -2186,7 +2186,7 @@ canon_usb_set_file_attributes (Camera *camera, unsigned int attr_bits,
* @destname: name file should have on camera
* @destpath: pathname for directory to put file
* @context: context for error reporting
- *
+ *
* Uploads file to USB camera
*
* Bugs:
@@ -2196,9 +2196,9 @@ canon_usb_set_file_attributes (Camera *camera, unsigned int attr_bits,
* s10sh (http://www.kyuzz.org/antirez/s10sh.html) has the same problem.
* The problem only appears when USB deinitialisation and initialisation
* is performed between uploads. You can call this function more than
- * once with big files during one session without encountering the problem
+ * once with big files during one session without encountering the problem
* described. <kramm@quiss.org>
- *
+ *
* Returns: gphoto2 error code
*
*/
@@ -2215,7 +2215,7 @@ canon_usb_put_file (Camera __unused__ *camera, CameraFile __unused__ *file,
#else /* else ifdef CANON_EXPERIMENTAL_UPLOAD */
int
-canon_usb_put_file (Camera *camera, CameraFile *file,
+canon_usb_put_file (Camera *camera, CameraFile *file,
const char *xfilename, const char *destname, const char *destpath,
GPContext *context)
{
@@ -2342,7 +2342,7 @@ canon_usb_put_file (Camera *camera, CameraFile *file,
/* Max length of data block */
htole32a ( packet+0x58, len2 );
- strcpy(&packet[0x5c], filename);
+ strcpy(&packet[0x5c], filename);
memcpy(&packet[0x5c+filename_len+1], &data[offs], len2);
status = gp_port_write (camera->port, packet, len1+0x40);
@@ -2443,7 +2443,7 @@ canon_usb_get_dirents (Camera *camera, unsigned char **dirent_data,
*
* the 0x00 before dirname means 'no recursion'
* NOTE: the first 0x00 after dirname is the NULL byte terminating
- * the string, so payload_length is strlen(dirname) + 4
+ * the string, so payload_length is strlen(dirname) + 4
*/
if (strlen (path) + 4 > sizeof (payload)) {
GP_DEBUG ("canon_usb_get_dirents: "
@@ -2514,7 +2514,7 @@ canon_usb_list_all_dirs (Camera *camera, unsigned char **dirent_data,
* the 0x0f before dirname means 'recurse to level 15', which
* should get all the directories on the camera.
* NOTE: the first 0x00 after dirname is the NULL byte terminating
- * the string, so payload_length is strlen(dirname) + 4
+ * the string, so payload_length is strlen(dirname) + 4
*/
if (strlen (disk_name) + 4 > sizeof (payload)) {
GP_DEBUG ("canon_usb_list_all_dirs: "
@@ -2611,9 +2611,9 @@ canon_usb_identify (Camera *camera, GPContext *context)
* the colon/space problem. (FIXME)
*/
for (i = 0; models[i].id_str != NULL; i++) {
- if (models[i].usb_vendor
+ if (models[i].usb_vendor
&& models[i].usb_product
- && (a.usb_vendor == models[i].usb_vendor)
+ && (a.usb_vendor == models[i].usb_vendor)
&& (a.usb_product == models[i].usb_product)) {
GP_DEBUG ("canon_usb_identify: USB ID match 0x%04x:0x%04x (model name \"%s\")",
models[i].usb_vendor, models[i].usb_product, models[i].id_str);
diff --git a/camlibs/canon/usb.h b/camlibs/canon/usb.h
index 68626f886..764b13737 100644
--- a/camlibs/canon/usb.h
+++ b/camlibs/canon/usb.h
@@ -102,7 +102,7 @@
* to select which command to issue to the camera. See the protocol
* document for details.
*/
-
+
typedef enum {
CANON_USB_FUNCTION_GET_FILE = 1,
CANON_USB_FUNCTION_IDENTIFY_CAMERA,
@@ -203,7 +203,7 @@ typedef enum {
} canonSubcommandIndex;
-struct canon_usb_control_cmdstruct
+struct canon_usb_control_cmdstruct
{
canonSubcommandIndex num;
char *description;
@@ -223,7 +223,7 @@ struct canon_usb_control_cmdstruct
-struct canon_usb_cmdstruct
+struct canon_usb_cmdstruct
{
canonCommandIndex num;
char *description;
@@ -253,14 +253,14 @@ struct canon_usb_status {
int canon_usb_init (Camera *camera, GPContext *context);
int canon_usb_set_file_time ( Camera *camera, char *camera_filename, time_t time, GPContext *context);
-int canon_usb_put_file (Camera *camera, CameraFile *file, const char *filename, const char *destname, const char *destpath,
+int canon_usb_put_file (Camera *camera, CameraFile *file, const char *filename, const char *destname, const char *destpath,
GPContext *context);
unsigned char *canon_usb_capture_dialogue (Camera *camera, unsigned int *return_length, int *photo_status, GPContext *context );
unsigned char *canon_usb_dialogue_full (Camera *camera, canonCommandIndex canon_funct,
unsigned int *return_length, const unsigned char *payload, unsigned int payload_length);
unsigned char *canon_usb_dialogue (Camera *camera, canonCommandIndex canon_funct,
unsigned int *return_length, const unsigned char *payload, unsigned int payload_length);
-int canon_usb_long_dialogue (Camera *camera, canonCommandIndex canon_funct, unsigned char **data,
+int canon_usb_long_dialogue (Camera *camera, canonCommandIndex canon_funct, unsigned char **data,
unsigned int *data_length, unsigned int max_data_size, const unsigned char *payload,
unsigned int payload_length, int display_status, GPContext *context);
int canon_usb_get_file (Camera *camera, const char *name, unsigned char **data, unsigned int *length, GPContext *context);
diff --git a/camlibs/canon/util.c b/camlibs/canon/util.c
index 5f4b21c33..f42c44311 100644
--- a/camlibs/canon/util.c
+++ b/camlibs/canon/util.c
@@ -1,6 +1,6 @@
/****************************************************************************
*
- * File: util.c
+ * File: util.c
*
* Utility functions for the gphoto2 camlibs/canon driver.
*
diff --git a/camlibs/casio/camtojpeg.c b/camlibs/casio/camtojpeg.c
index d014ecec8..f8a3d2d3b 100644
--- a/camlibs/casio/camtojpeg.c
+++ b/camlibs/casio/camtojpeg.c
@@ -62,16 +62,16 @@ int QVcamtojpeg(const unsigned char *cam, long int camSize, unsigned char **jpeg
+sizeof(sos_v)+vsize
+sizeof(eoi)
));
-
+
dst=*jpeg;
memcpy(dst,soi,sizeof(soi)); dst+=sizeof(soi);
memcpy(dst,app0,sizeof(app0)); dst+=sizeof(app0);
cam+=8;
-
+
memcpy(dst,dqt0,sizeof(dqt0)); dst+=sizeof(dqt0);
memcpy(dst,cam,64); dst+=64; cam+=64;
-
+
memcpy(dst,dqt1,sizeof(dqt1)); dst+=sizeof(dqt1);
memcpy(dst,cam,64); dst+=64; cam+=64;
@@ -80,7 +80,7 @@ int QVcamtojpeg(const unsigned char *cam, long int camSize, unsigned char **jpeg
memcpy(dst,sos_y,sizeof(sos_y)); dst+=sizeof(sos_y);
memcpy(dst,cam,ysize); dst+=ysize; cam+=ysize;
-
+
memcpy(dst,sos_u,sizeof(sos_u)); dst+=sizeof(sos_u);
memcpy(dst,cam,usize); dst+=usize; cam+=usize;
@@ -97,7 +97,7 @@ int QVfinecamtojpeg(const unsigned char *cam, long int camSize, unsigned char **
int size;
static const unsigned char c[1] = { 1 };
unsigned char *dst;
-
+
size = u32(cam + 4);
*jpeg=malloc(*jpegSize=
@@ -123,7 +123,7 @@ int QVfinecamtojpeg(const unsigned char *cam, long int camSize, unsigned char **
memcpy(dst,sof_f,sizeof(sof_f)); dst+=sizeof(sof_f);
memcpy(dst,dht_f,sizeof(dht_f)); dst+=sizeof(dht_f);
-
+
memcpy(dst,sos_f,sizeof(sos_f)); dst+=sizeof(sos_f);
memcpy(dst,cam,size); dst+=size; cam+=size;
diff --git a/camlibs/casio/casio-qv-commands.c b/camlibs/casio/casio-qv-commands.c
index d11828c9f..2feff9aaf 100644
--- a/camlibs/casio/casio-qv-commands.c
+++ b/camlibs/casio/casio-qv-commands.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -53,10 +53,10 @@ QVping (Camera *camera)
switch (c) {
case ACK:
case ENQ:
-
+
/*
* According to gphoto, we need to wait
- * for ACK. But the camera of
+ * for ACK. But the camera of
* David Wolfskill <david@catwhisker.org>
* seems to return ENQ after some NAK.
*/
@@ -70,12 +70,12 @@ QVping (Camera *camera)
case UNKNOWN1:
case UNKNOWN2:
- /*
+ /*
* David Wolfskill <david@catwhisker.org>
* has seen those two bytes if one sends
* only ENQs to the camera. The camera first
* answers with some NAKs, then with some
- * ACKs, and finally with UNKNOWN1 and
+ * ACKs, and finally with UNKNOWN1 and
* UNKNOWN2.
*/
while (gp_port_read (camera->port, (char *)&c, 1) >= 0);
@@ -197,7 +197,7 @@ QVblockrecv (Camera *camera, unsigned char **buf, unsigned long int *buf_len)
return (GP_ERROR_CORRUPTED_DATA);
else
continue;
- }
+ }
/* Acknowledge and prepare for next packet */
c = ACK;
@@ -387,7 +387,7 @@ int
QVstatus (Camera *camera, char *status)
{
unsigned char cmd[3];
-
+
cmd[0] = 'D';
cmd[1] = 'S';
cmd[2] = STX;
@@ -400,7 +400,7 @@ int
QVreset (Camera *camera)
{
unsigned char cmd[2];
-
+
cmd[0] = 'Q';
cmd[1] = 'R';
CR (QVsend (camera, cmd, 2, NULL, 0));
diff --git a/camlibs/casio/casio-qv-commands.h b/camlibs/casio/casio-qv-commands.h
index a4f3d915c..2e3cb9007 100644
--- a/camlibs/casio/casio-qv-commands.h
+++ b/camlibs/casio/casio-qv-commands.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/casio/casio-qv.c b/camlibs/casio/casio-qv.c
index 0d625f2d7..0c88cdf4b 100644
--- a/camlibs/casio/casio-qv.c
+++ b/camlibs/casio/casio-qv.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -53,7 +53,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *file,
CameraFileInfo *info, void *data, GPContext *context);
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy (id->text, "Casio QV");
@@ -77,7 +77,7 @@ static struct {
};
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
int i;
CameraAbilities a;
@@ -104,7 +104,7 @@ camera_abilities (CameraAbilitiesList *list)
CHECK_RESULT (gp_abilities_list_append (list, a));
}
-
+
return (GP_OK);
}
@@ -182,7 +182,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
}
static int
-camera_about (Camera *camera, CameraText *about, GPContext *context)
+camera_about (Camera *camera, CameraText *about, GPContext *context)
{
strcpy (about->text, _("Driver framework written by Lutz Mueller "
"<lutz@users.sf.net>.\n"
@@ -278,7 +278,7 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (child, _("OK"));
if (status[0]&0x80) strcpy (t, _("Too bright"));
else if (status[0]&0x40) strcpy (t, _("Too dark"));
- else strcpy (t, _("OK"));
+ else strcpy (t, _("OK"));
gp_widget_set_value (child, t);
gp_widget_append (*window, child);
@@ -327,7 +327,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
gp_port_settings settings;
int selected_speed;
diff --git a/camlibs/casio/ycctoppm.c b/camlibs/casio/ycctoppm.c
index 90889d9f4..cb7d0e25c 100644
--- a/camlibs/casio/ycctoppm.c
+++ b/camlibs/casio/ycctoppm.c
@@ -64,7 +64,7 @@ int QVycctoppm(const unsigned char *ycc, long int yccSize, int width, int height
{
for (x=0; x<width; ++x)
{
- L = Y[y * width + x] * 100000;
+ L = Y[y * width + x] * 100000;
cb = Cb[(y/RATE_H) * width/ratew + x/ratew];
if (cb > 127) cb = cb - 256;
cr = Cr[(y/RATE_H) * width/ratew + x/ratew];
diff --git a/camlibs/clicksmart310/clicksmart.c b/camlibs/clicksmart310/clicksmart.c
index 3b879b896..00b8349b5 100644
--- a/camlibs/clicksmart310/clicksmart.c
+++ b/camlibs/clicksmart310/clicksmart.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -34,7 +34,7 @@
#include "clicksmart.h"
#include "spca50x-jpeg-header.h"
-#define GP_MODULE "clicksmart310"
+#define GP_MODULE "clicksmart310"
#define CS_INIT 0x8000
#define CS_INIT2 0xd41
@@ -43,16 +43,16 @@
#define CS_CH_CLEAR 0xd05
#define CS_READCLOSE 0x8303
-static int
-CLICKSMART_READ (GPPort *port, int index, char *data)
+static int
+CLICKSMART_READ (GPPort *port, int index, char *data)
{
gp_port_usb_msg_interface_read(port, 0, 0, index, data, 1);
return GP_OK;
}
-static int
-CLICKSMART_READ_STATUS (GPPort *port, char *data)
-{
+static int
+CLICKSMART_READ_STATUS (GPPort *port, char *data)
+{
return gp_port_usb_msg_interface_read(port, 0, 0, CS_CH_READY, data, 1);
}
@@ -72,17 +72,17 @@ int clicksmart_init (GPPort *port, CameraPrivateLibrary *priv)
CLICKSMART_READ(port, CS_INIT2, &c);
CLICKSMART_READ(port, CS_NUM_PICS, &c);
- priv->num_pics = (unsigned)c;
+ priv->num_pics = (unsigned)c;
full_reads = (unsigned)c/2;
short_read = (unsigned)c%2;
cat_size = (unsigned)c*0x10;
temp_catalog = malloc(cat_size);
- if (!temp_catalog)
+ if (!temp_catalog)
return GP_ERROR_NO_MEMORY;
memset (temp_catalog, 0, cat_size);
/* now we need to get and put away the catalog data. */
-
+
CLICKSMART_READ_STATUS (port, &c);
gp_port_usb_msg_interface_write(port, 6, 0, 9, NULL, 0);
while (c != 1) {
@@ -96,18 +96,18 @@ int clicksmart_init (GPPort *port, CameraPrivateLibrary *priv)
return GP_ERROR_NO_MEMORY;
}
/*
- * The catalog data is downloaded in reverse order, which needs to be
+ * The catalog data is downloaded in reverse order, which needs to be
* straightened out.
- */
+ */
for (i=0; i < full_reads; i++) {
memset (buffer, 0, 0x200);
gp_port_read(port, (char *)buffer, 0x200);
memcpy (temp_catalog + cat_size - (2*i+1)*0x10, buffer, 0x10);
- memcpy (temp_catalog + cat_size - (2*i+2)*0x10, buffer+0x100,
+ memcpy (temp_catalog + cat_size - (2*i+2)*0x10, buffer+0x100,
0x10);
}
if (short_read) {
- memset (buffer, 0, 0x200);
+ memset (buffer, 0, 0x200);
gp_port_read(port, (char *)buffer, 0x100);
memcpy (temp_catalog, buffer, 0x10);
}
@@ -125,15 +125,15 @@ int clicksmart_get_res_setting (CameraPrivateLibrary *priv, int n)
{
GP_DEBUG("running clicksmart_get_res_setting for picture %i\n", n+1);
/*
- * QCIF (176x144) returns 1, or if the entry is a clip frame, then 3
- * and CIF (352x288) returns 0.
+ * QCIF (176x144) returns 1, or if the entry is a clip frame, then 3
+ * and CIF (352x288) returns 0.
*/
return priv->catalog[16*n];
}
-int
-clicksmart_read_pic_data (CameraPrivateLibrary *priv, GPPort *port,
- unsigned char **data, int n)
+int
+clicksmart_read_pic_data (CameraPrivateLibrary *priv, GPPort *port,
+ unsigned char **data, int n)
{
int offset=0;
char c;
@@ -154,8 +154,8 @@ clicksmart_read_pic_data (CameraPrivateLibrary *priv, GPPort *port,
return r;
}
/* Get the size of the data and calculate the size to download, which
- * is the next multiple of 0x100. Only for the hi-res photos is the
- * true data size actually given.
+ * is the next multiple of 0x100. Only for the hi-res photos is the
+ * true data size actually given.
*/
size=(priv->catalog[16*n + 12] * 0x100)+(priv->catalog[16*n + 11]);
@@ -179,18 +179,18 @@ clicksmart_read_pic_data (CameraPrivateLibrary *priv, GPPort *port,
remainder=((remainder+0xff)/0x100)*0x100;
GP_DEBUG("Second remainder: %x\n", remainder);
- if (remainder)
+ if (remainder)
gp_port_read(port, (char *)*data + offset, remainder);
gp_port_usb_msg_interface_read(port, 0, 0, CS_READCLOSE, &c, 1);
gp_port_usb_msg_interface_write(port, 0, 2, CS_CH_READY, NULL, 0);
- /*
- * For lo-res photos the camera does not tell us the true size, but
+ /*
+ * For lo-res photos the camera does not tell us the true size, but
* when the data has ended the excess bytes downloaded are all
* 00. The photo processing works better if these are suppressed.
*/
-
+
if (priv->catalog[16*n]) {
while ((size > 1) && (*data)[size-1] == 0)
size--;
@@ -198,8 +198,8 @@ clicksmart_read_pic_data (CameraPrivateLibrary *priv, GPPort *port,
return size;
}
-int
-clicksmart_delete_all_pics (GPPort *port)
+int
+clicksmart_delete_all_pics (GPPort *port)
{
gp_port_usb_msg_interface_write(port, 0, 2, CS_CH_READY, NULL, 0);
gp_port_usb_msg_interface_write(port, 2, 0, 5, NULL, 0);
@@ -211,17 +211,17 @@ clicksmart_reset (GPPort *port)
{
char c;
/* Release current register */
- CLICKSMART_READ (port, CS_READCLOSE, &c);
+ CLICKSMART_READ (port, CS_READCLOSE, &c);
gp_port_usb_msg_interface_write(port, 0, 2, CS_CH_READY, NULL, 0);
- CLICKSMART_READ (port, CS_CH_CLEAR, &c);
- CLICKSMART_READ (port, CS_CH_CLEAR, &c);
+ CLICKSMART_READ (port, CS_CH_CLEAR, &c);
+ CLICKSMART_READ (port, CS_CH_CLEAR, &c);
return GP_OK;
}
/* create_jpeg_from_data adapted from camlibs/spca50x */
-int create_jpeg_from_data (unsigned char * dst, unsigned char * src,
- int qIndex, int w, int h, unsigned char format,
+int create_jpeg_from_data (unsigned char * dst, unsigned char * src,
+ int qIndex, int w, int h, unsigned char format,
int o_size, int *size,
int omit_huffman_table, int omit_escape)
{
diff --git a/camlibs/clicksmart310/clicksmart.h b/camlibs/clicksmart310/clicksmart.h
index 5982ef99c..a3dc62cf5 100644
--- a/camlibs/clicksmart310/clicksmart.h
+++ b/camlibs/clicksmart310/clicksmart.h
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -41,12 +41,12 @@ int clicksmart_delete_all_pics (GPPort *port);
int clicksmart_reset (GPPort *port);
-int create_jpeg_from_data (unsigned char * dst, unsigned char * src,
- int qIndex, int w, int h,
- unsigned char format,
+int create_jpeg_from_data (unsigned char * dst, unsigned char * src,
+ int qIndex, int w, int h,
+ unsigned char format,
int o_size, int *size,
- int omit_huffman_table,
+ int omit_huffman_table,
int omit_escape);
-#endif
+#endif
diff --git a/camlibs/clicksmart310/library.c b/camlibs/clicksmart310/library.c
index 674c9ec25..6654c5384 100644
--- a/camlibs/clicksmart310/library.c
+++ b/camlibs/clicksmart310/library.c
@@ -151,7 +151,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
Camera *camera = data;
int n;
GP_DEBUG ("List files in %s\n", folder);
- n = camera->pl->num_pics;
+ n = camera->pl->num_pics;
gp_list_populate(list, "cs%03i.jpeg", n);
return GP_OK;
}
@@ -172,7 +172,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* Get the entry number of the photo on the camera */
k = gp_filesystem_number (camera->fs, "/", filename, context);
-
+
if (GP_FILE_TYPE_EXIF==type) return GP_ERROR_FILE_EXISTS;
if (GP_FILE_TYPE_RAW!=type && GP_FILE_TYPE_NORMAL !=type && GP_FILE_TYPE_PREVIEW!=type)
@@ -192,7 +192,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
jpeg_format = JPEG_QCIF_FORMAT;
break;
default: GP_DEBUG ( "Unknown resolution setting %i\n", res);
- return GP_ERROR;
+ return GP_ERROR;
}
data = NULL;
@@ -205,16 +205,16 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
gp_file_set_data_and_size (file, (char *)data, b);
/* Reset camera when done, for more graceful exit. */
if (k +1 == camera->pl->num_pics) {
- clicksmart_reset (camera->port);
+ clicksmart_reset (camera->port);
}
return GP_OK;
}
-
- GP_DEBUG ("size = %i\n", b);
+
+ GP_DEBUG ("size = %i\n", b);
/* It looks as though o_size = b */
/* It seems that qIndex is byte7, which is always 3, so I use that. */
-
+
file_size = b + 589 + 1024 * 10;
jpeg_out = malloc(file_size);
diff --git a/camlibs/clicksmart310/spca50x-jpeg-header.h b/camlibs/clicksmart310/spca50x-jpeg-header.h
index d8a1da0a2..e0038a378 100644
--- a/camlibs/clicksmart310/spca50x-jpeg-header.h
+++ b/camlibs/clicksmart310/spca50x-jpeg-header.h
@@ -1,19 +1,19 @@
-/* spca50x-jpeg-header.h
+/* spca50x-jpeg-header.h
*
* part of libgphoto2/camlibs/clicksmart310
*
- * This file is essentially identical to the file of the same name,
- * found in libgphoto2/camlibs/spca50x.
+ * This file is essentially identical to the file of the same name,
+ * found in libgphoto2/camlibs/spca50x.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -35,7 +35,7 @@
#define SPCA50X_JPG_DEFAULT_HEADER_PART3_LENGTH 33
#define SPCA50X_JPG_DEFAULT_HEADER_LENGTH 589
-static unsigned
+static unsigned
char SPCA50xJPGDefaultHeaderPart1[SPCA50X_JPG_DEFAULT_HEADER_PART1_LENGTH] = {
/* SOI(Start of Image) */
0xFF,0xD8,
@@ -53,7 +53,7 @@ char SPCA50xJPGDefaultHeaderPart1[SPCA50X_JPG_DEFAULT_HEADER_PART1_LENGTH] = {
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22
};
-static unsigned
+static unsigned
char SPCA50xJPGDefaultHeaderPart2[SPCA50X_JPG_DEFAULT_HEADER_PART2_LENGTH] = {
/* DHT(Define Huffman Table) */
0xFF,0xC4,
@@ -89,7 +89,7 @@ char SPCA50xJPGDefaultHeaderPart2[SPCA50X_JPG_DEFAULT_HEADER_PART2_LENGTH] = {
* 5 - 6 : Image Height(H Byte,L Byte)
* 7 - 8 : Image Width(H Byte,L Byte)
*/
-static unsigned
+static unsigned
char SPCA50xJPGDefaultHeaderPart3[SPCA50X_JPG_DEFAULT_HEADER_PART3_LENGTH] = {
/* SOFn(Start of Frame) */
0xFF,0xC0,
diff --git a/camlibs/digigr8/digi_postprocess.c b/camlibs/digigr8/digi_postprocess.c
index 427ebc6c2..995716c7e 100644
--- a/camlibs/digigr8/digi_postprocess.c
+++ b/camlibs/digigr8/digi_postprocess.c
@@ -1,18 +1,18 @@
/*
* postprocess.c
*
- * Here are the decompression function for the compressed photos and the
- * postprocessing for uncompressed photos.
+ * Here are the decompression function for the compressed photos and the
+ * postprocessing for uncompressed photos.
*
* Copyright (c) 2005 and 2007 Theodore Kilgore <kilgota@auburn.edu>
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
- * The chip supported by this driver is presumed to be the SQ905,
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
+ * The chip supported by this driver is presumed to be the SQ905,
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
#include <config.h>
@@ -32,7 +32,7 @@
#include <gamma.h>
#include "digigr8.h"
-#define GP_MODULE "digigr8"
+#define GP_MODULE "digigr8"
#ifndef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b))
@@ -59,7 +59,7 @@ digi_first_decompress (unsigned char *output, unsigned char *input,
unsigned char lookup_table[16]
={0, 2, 6, 0x0e, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4,
0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb};
- unsigned char translator[16] =
+ unsigned char translator[16] =
{8, 7, 9, 6, 10, 11, 12, 13, 14, 15, 5, 4, 3, 2, 1, 0};
GP_DEBUG ("Running first_decompress.\n");
@@ -84,7 +84,7 @@ digi_first_decompress (unsigned char *output, unsigned char *input,
cycles ++ ;
if (cycles > 8) {
GP_DEBUG ("Too many cycles?\n");
- return GP_ERROR;
+ return GP_ERROR;
}
lookup = temp2 & 0xff;
}
@@ -97,12 +97,12 @@ digi_first_decompress (unsigned char *output, unsigned char *input,
}
if (lookup == lookup_table[i] ) {
nibble_to_keep[parity] = translator[i];
- break;
+ break;
}
}
cycles = 0;
parity ++ ;
- }
+ }
output[bytes_done] = (nibble_to_keep[0] << 4)
| nibble_to_keep[1];
bytes_done++;
@@ -141,7 +141,7 @@ digi_second_decompress (unsigned char *uncomp, unsigned char *in,
}
for(i=0; i < width; i++)
templine_green[i] = 0x80;
-
+
templine_blue = malloc(width);
if (!templine_blue) {
free (templine_red);
@@ -333,7 +333,7 @@ digi_postprocess(int width, int height,
===================================================================== */
static int
-histogram (unsigned char *data, unsigned int size, int *htable_r,
+histogram (unsigned char *data, unsigned int size, int *htable_r,
int *htable_g, int *htable_b)
{
int x;
@@ -428,7 +428,7 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
{
d = (data[x + 0] << 8) * r_factor + 8;
d >>= 8;
- if (d > 0xff)
+ if (d > 0xff)
d = 0xff;
data[x + 0] = d;
d = (data[x + 1] << 8) * g_factor + 8;
@@ -437,7 +437,7 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
data[x + 1] = d;
d = (data[x + 2] << 8) * b_factor + 8;
d >>= 8;
- if (d > 0xff)
+ if (d > 0xff)
d = 0xff;
data[x + 2] = d;
}
@@ -503,7 +503,7 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
if (b > d)
b = b + (int) ((b - d) * (0xff - b)
/(0x100 - d) * saturation);
- else
+ else
b = b + (int) ((b - d) * (0xff - d)
/(0x100 - b) * saturation);
data[x+0] = CLAMP(r);
diff --git a/camlibs/digigr8/digigr8.c b/camlibs/digigr8/digigr8.c
index e8265e398..07aee65d9 100644
--- a/camlibs/digigr8/digigr8.c
+++ b/camlibs/digigr8/digigr8.c
@@ -2,18 +2,18 @@
* digigr8.c
*
* Part of libgphoto2/camlibs/digigr8
- * Here are the functions which are needed to get data from the camera.
+ * Here are the functions which are needed to get data from the camera.
*
* Copyright (c) 2005 Theodore Kilgore <kilgota@auburn.edu>
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
* Cameras supported by this driver have Product ID 0x905C, 0x9050, or.
* 0x913D.
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
#include <config.h>
@@ -32,12 +32,12 @@
#include <gphoto2/gphoto2-port.h>
#include "digigr8.h"
-#define GP_MODULE "digigr8"
+#define GP_MODULE "digigr8"
#define SQWRITE gp_port_usb_msg_write
#define SQREAD gp_port_usb_msg_read
-int
+int
digi_init (GPPort *port, CameraPrivateLibrary *priv)
{
char c[0x14];
@@ -53,7 +53,7 @@ digi_init (GPPort *port, CameraPrivateLibrary *priv)
digi_reset (port);
SQWRITE (port, 0x0c, 0x14f0, 0x0, NULL, 0);
- gp_port_read (port, c, 0x14);
+ gp_port_read (port, c, 0x14);
digi_reset(port);
SQWRITE (port, 0x0c, 0x20, 0x40, NULL, 0);
gp_port_read(port, (char *)catalog, 0x4000); /* We need 16 bytes for each photo. */
@@ -68,9 +68,9 @@ digi_init (GPPort *port, CameraPrivateLibrary *priv)
memset (catalog+i, 0, 16);
if (i) {
/*
- * 0x913c cameras allow individual photo deletion. This causes
+ * 0x913c cameras allow individual photo deletion. This causes
* the relevant catalog line to start with 0x64. So the related
- * lines of config data must be removed, and the deleted
+ * lines of config data must be removed, and the deleted
* images need to be cast out from the count.
*/
@@ -107,7 +107,7 @@ digi_get_comp_ratio (CameraPrivateLibrary *priv, int entry)
case 0x43:
case 0x52:
case 0x53:
- case 0x56:
+ case 0x56:
case 0x72: return 0;
default:
GP_DEBUG ("Your camera has unknown resolution settings.\n");
@@ -118,15 +118,15 @@ digi_get_comp_ratio (CameraPrivateLibrary *priv, int entry)
unsigned int
digi_get_data_size (CameraPrivateLibrary *priv, int entry)
{
- return ((priv->catalog[16*entry + 6] <<16)
- | (priv->catalog[16*entry + 5] <<8)
+ return ((priv->catalog[16*entry + 6] <<16)
+ | (priv->catalog[16*entry + 5] <<8)
| (priv->catalog[16*entry + 4] ) );
}
unsigned int
digi_get_picture_width (CameraPrivateLibrary *priv, int entry)
{
- switch (priv->catalog[16*entry]) {
+ switch (priv->catalog[16*entry]) {
case 0x41:
case 0x52:
case 0x61: return 352;
@@ -148,8 +148,8 @@ int
digi_rewind (GPPort *port, CameraPrivateLibrary *priv)
{
static char dummy_buf[0x4000];
-
-
+
+
GP_DEBUG("REWIND cam's data pointer");
/* One has to read the catalog to rewind the data stream...
@@ -158,7 +158,7 @@ digi_rewind (GPPort *port, CameraPrivateLibrary *priv)
digi_reset(port);
SQWRITE (port, 0x0c, 0x20, 0x40, NULL, 0); /* Access config */
- gp_port_read(port, dummy_buf, 0x4000);
+ gp_port_read(port, dummy_buf, 0x4000);
digi_reset (port);
priv->last_fetched_entry = -1;
@@ -184,8 +184,8 @@ digi_read_picture_data (GPPort *port, unsigned char *data, unsigned int size, in
int ret;
if (!n) {
- SQWRITE (port, 0x0c, 0x30, 0x00, NULL, 0);
- }
+ SQWRITE (port, 0x0c, 0x30, 0x00, NULL, 0);
+ }
while ((offset + 0x8000 < size)) {
ret = gp_port_read (port, (char *)data + offset, 0x8000);
if (ret < GP_OK) return ret;
@@ -195,9 +195,9 @@ digi_read_picture_data (GPPort *port, unsigned char *data, unsigned int size, in
if (ret < GP_OK) return ret;
return GP_OK;
-}
+}
-int digi_delete_all (GPPort *port, CameraPrivateLibrary *priv)
+int digi_delete_all (GPPort *port, CameraPrivateLibrary *priv)
{
int size;
int num_pics;
@@ -232,7 +232,7 @@ int digi_delete_all (GPPort *port, CameraPrivateLibrary *priv)
return GP_ERROR_NO_MEMORY;
}
gp_port_read(port, (char *)junk, size);
- free(junk);
+ free(junk);
digi_reset (port);
return GP_OK;
diff --git a/camlibs/digigr8/digigr8.h b/camlibs/digigr8/digigr8.h
index 70f055153..c03ccc7ac 100644
--- a/camlibs/digigr8/digigr8.h
+++ b/camlibs/digigr8/digigr8.h
@@ -1,18 +1,18 @@
/*
- * digigr8.h
+ * digigr8.h
*
- * Header file for libgphoto2/camlibs/digigr8.
+ * Header file for libgphoto2/camlibs/digigr8.
*
* Copyright (c) 2005 Theodore Kilgore <kilgota@auburn.edu>
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
- * Cameras supported by this driver have Product ID 0x905C, 0x9050, or
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
+ * Cameras supported by this driver have Product ID 0x905C, 0x9050, or
* 0x913D.
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
#ifndef __DIGIGR8_H__
#define __DIGIGR8_H__
@@ -31,7 +31,7 @@ struct _CameraPrivateLibrary {
int digi_reset (GPPort *);
int digi_init (GPPort *, CameraPrivateLibrary *);
int digi_rewind (GPPort *port, CameraPrivateLibrary *priv);
-int digi_read_picture_data (GPPort *, unsigned char *data,
+int digi_read_picture_data (GPPort *, unsigned char *data,
unsigned int size, int n);
/* Those functions don't need data transfer with the camera */
@@ -40,7 +40,7 @@ unsigned int digi_get_comp_ratio (CameraPrivateLibrary *, int entry);
unsigned int digi_get_data_size (CameraPrivateLibrary *, int entry);
unsigned int digi_get_picture_width (CameraPrivateLibrary *, int entry);
int digi_is_clip (CameraPrivateLibrary *, int entry);
-int digi_decompress (unsigned char *out_data, unsigned char *data,
+int digi_decompress (unsigned char *out_data, unsigned char *data,
int w, int h);
int digi_postprocess (int width, int height, unsigned char* rgb);
int digi_delete_all (GPPort *, CameraPrivateLibrary *priv);
diff --git a/camlibs/digigr8/library.c b/camlibs/digigr8/library.c
index 4f08e26f7..d4a931b8e 100644
--- a/camlibs/digigr8/library.c
+++ b/camlibs/digigr8/library.c
@@ -459,7 +459,7 @@ camera_init(Camera *camera, GPContext *context)
/* Tell the CameraFilesystem where to get lists from */
gp_filesystem_set_funcs(camera->fs, &fsfuncs, camera);
camera->pl = malloc(sizeof (CameraPrivateLibrary));
- if (!camera->pl)
+ if (!camera->pl)
return GP_ERROR_NO_MEMORY;
camera->pl->catalog = NULL;
camera->pl->nb_entries = 0;
diff --git a/camlibs/digita/digita.c b/camlibs/digita/digita.c
index 023212969..b586db965 100644
--- a/camlibs/digita/digita.c
+++ b/camlibs/digita/digita.c
@@ -97,7 +97,7 @@ int camera_abilities(CameraAbilitiesList *list)
a.speed[5] = 0;
a.operations = GP_OPERATION_NONE;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
- a.file_operations = GP_FILE_OPERATION_PREVIEW |
+ a.file_operations = GP_FILE_OPERATION_PREVIEW |
GP_FILE_OPERATION_DELETE;
a.usb_vendor = models[i].usb_vendor;
a.usb_product = models[i].usb_product;
@@ -208,7 +208,7 @@ static int file_list_func(CameraFilesystem *fs, const char *folder,
}
#define GFD_BUFSIZE 19432
-static unsigned char *digita_file_get(Camera *camera, const char *folder,
+static unsigned char *digita_file_get(Camera *camera, const char *folder,
const char *filename, int thumbnail, int *size,
GPContext *context)
{
@@ -318,7 +318,7 @@ static int get_file_func(CameraFilesystem *fs, const char *folder,
Camera *camera = user_data;
unsigned char *data;
unsigned int width, height;
- char ppmhead[64];
+ char ppmhead[64];
int buflen;
if (folder[0] == '/')
@@ -403,7 +403,7 @@ static int camera_about(Camera *camera, CameraText *about, GPContext *context)
return GP_OK;
}
-static int digita_file_delete(Camera *camera, const char *folder,
+static int digita_file_delete(Camera *camera, const char *folder,
const char *filename, GPContext *context)
{
struct filename fn;
diff --git a/camlibs/dimera/dimera3500.c b/camlibs/dimera/dimera3500.c
index ccf2b5c70..187645e4b 100644
--- a/camlibs/dimera/dimera3500.c
+++ b/camlibs/dimera/dimera3500.c
@@ -1,4 +1,4 @@
-/*
+/*
* Program: gPhoto2 driver for Mustek VDC 3500/Relisys Dimera 3500
*
* Note:
@@ -69,7 +69,7 @@
static const char Dimera_thumbhdr[] =
"P5\n# Dimera 3500 Thumbnail written by gphoto2\n64 48\n255\n";
-static const char Dimera_viewhdr[] =
+static const char Dimera_viewhdr[] =
"P5\n# Dimera 3500 Viewfinder written by gphoto2\n128 96\n15\n";
static const char Dimera_finehdr[] =
@@ -93,9 +93,9 @@ Dimera_Preview( long *size, Camera *camera, GPContext *context );
/* Gphoto2 */
struct _CameraPrivateLibrary {
- unsigned exposure;
- int auto_exposure;
- int auto_flash;
+ unsigned exposure;
+ int auto_exposure;
+ int auto_flash;
};
@@ -196,7 +196,7 @@ conversion_chuck (const unsigned int width, const unsigned int height,
*
* Convert the 4 cells into a single RGB pixel.
* Colors are encoded as follows:
- *
+ *
* 000000000000000000........33
* 000000000011111111........11
* 012345678901234567........89
@@ -216,7 +216,7 @@ conversion_chuck (const unsigned int width, const unsigned int height,
* The exception is when x or y are zero then the neighors used are
* the +1 cells.
*/
-
+
for (y = 0;y < height; y++)
for (x = 0;x < width; x++) {
p1 = ((y==0?y+1:y-1)*width) + (x==0?x+1:x-1);
@@ -306,7 +306,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
if (!data)
return GP_ERROR;
gp_file_set_data_and_size (file, (char *)data, size); /* will take over data ptr ownership */
- gp_file_set_mime_type (file, GP_MIME_RAW);
+ gp_file_set_mime_type (file, GP_MIME_RAW);
gp_file_adjust_name_for_mime_type (file);
break;
case GP_FILE_TYPE_PREVIEW:
@@ -441,7 +441,7 @@ static int camera_summary (Camera *camera, CameraText *summary, GPContext *conte
eeprom_capacity = eeprom_size_table[eeprom_info[11]];
}
/* Estimate the number of pictures that this size of flash can hold */
- hi_pics_max = eeprom_capacity / 2;
+ hi_pics_max = eeprom_capacity / 2;
lo_pics_max = (eeprom_capacity * 13) / 8;
if (features.feature_bits_lo & AC_PRESENT)
@@ -645,7 +645,7 @@ Dimera_Get_Full_Image (int picnum, long *size, int *width, int *height,
if ( (s == GP_ERROR_TIMEOUT || s == GP_ERROR_CORRUPTED_DATA) && --retry > 0)
{
- GP_DEBUG( "Dimera_Get_Full_Image: retrans");
+ GP_DEBUG( "Dimera_Get_Full_Image: retrans");
continue;
}
GP_DEBUG(
@@ -681,7 +681,7 @@ Dimera_Get_Full_Image (int picnum, long *size, int *width, int *height,
if ( (s == GP_ERROR_TIMEOUT || s == GP_ERROR_CORRUPTED_DATA) && --retry > 0)
{
- GP_DEBUG("Dimera_Get_Full_Image: retrans");
+ GP_DEBUG("Dimera_Get_Full_Image: retrans");
continue;
}
GP_DEBUG(
@@ -744,7 +744,7 @@ static unsigned calc_new_exposure(unsigned exposure, unsigned brightness) {
/* Choose the correct curve for this camera scene */
for (i=0; exposure_tables[i].M; ++i) {
- GP_DEBUG( "brightness %d, %f ",
+ GP_DEBUG( "brightness %d, %f ",
brightness,
exp((double)((brightness/16.0) - exposure_tables[i].b) / exposure_tables[i].M));
if (exp((double)((brightness/16.0) - exposure_tables[i].b) / exposure_tables[i].M) > exposure)
diff --git a/camlibs/dimera/dimeratab.h b/camlibs/dimera/dimeratab.h
index e37669635..9e3f97a11 100644
--- a/camlibs/dimera/dimeratab.h
+++ b/camlibs/dimera/dimeratab.h
@@ -1,13 +1,13 @@
/*
dimeratab.h -- Color conversion values for the Dimera 3500
-
+
These tables were deduced by analyzing the output of the Windows Dimera
driver. Many of the values are probably wrong, but this produces a
decent image. My analysis was done using several outdoor pictures in
sunlight. In other lighting conditions, your mileage may vary.
-
+
Comments or suggestions? Email me.
-
+
-- Chuck Homic <chuck@vvisions.com>
$Id$
diff --git a/camlibs/dimera/mesalib.c b/camlibs/dimera/mesalib.c
index 27fac267a..044e430fd 100644
--- a/camlibs/dimera/mesalib.c
+++ b/camlibs/dimera/mesalib.c
@@ -204,7 +204,7 @@ mesa_set_speed( GPPort *port, int speed )
if (speed == 0)
speed = 115200; /* use default speed */
- GP_DEBUG(
+ GP_DEBUG(
"mesa_set_speed: speed %d", speed);
b[0] = SET_SPEED;
@@ -266,7 +266,7 @@ mesa_version( GPPort *port, char *version_string)
return GP_ERROR_TIMEOUT;
}
- GP_DEBUG(
+ GP_DEBUG(
"mesa_version: %02x:%02x:%02x\n", r[0], r[1], r[2] );
sprintf(v, "%2x.%02x%c", r[1], r[0], r[2]);
/* highest byte must be < MESA_VERSION_SZ */
@@ -323,7 +323,7 @@ mesa_ram_test( GPPort *port )
* * The following contradicted by traces from my Win98 twain driver* GDB
* ******************************************************************** GDB
* The image is stored in the camera as 504 row (0 - 503), the first 8 and the
- * last 2 are blank.
+ * last 2 are blank.
* The rows are 18 dummy pixels, 2 blanks, 646 pixels, 13 bytes garbage,
* 2 bytes blanks
*
@@ -436,7 +436,7 @@ mesa_black_levels( GPPort *port, uint8_t r[2] )
* the image can be full scale, 0, zoom 2x 1, zoom 4x, 2, and for
* low res images, 8x, 3.
*
- * row and column may be offset 0-197 and 0-223 for zoom.
+ * row and column may be offset 0-197 and 0-223 for zoom.
*
* exposure is * 1/50000 seconds.
*
@@ -471,7 +471,7 @@ mesa_snap_view( GPPort *port, uint8_t *r, unsigned int hi_res,
return GP_ERROR_BAD_PARAMETERS;
else if ( download == 249 || download == 250 )
bytes = 1536;
- else if ( download == 251 )
+ else if ( download == 251 )
bytes = 6144;
else if ( download == 252 )
bytes = 0;
@@ -520,7 +520,7 @@ mesa_snap_view( GPPort *port, uint8_t *r, unsigned int hi_res,
return GP_ERROR_CORRUPTED_DATA;
}
}
-
+
return bytes;
}
@@ -556,7 +556,7 @@ mesa_download_view( GPPort *port, uint8_t *r, uint8_t download )
return GP_ERROR_BAD_PARAMETERS;
else if ( download == 249 )
bytes = 1536;
- else if ( download == 250 || download == 251 )
+ else if ( download == 250 || download == 251 )
bytes = 768;
else if ( download == 252 )
bytes = 0;
@@ -594,7 +594,7 @@ mesa_download_view( GPPort *port, uint8_t *r, uint8_t download )
if ( cksum != b[0] )
return GP_ERROR_CORRUPTED_DATA;
}
-
+
return bytes;
}
@@ -753,7 +753,7 @@ mesa_recv_test( GPPort *port, uint8_t r[6] )
{
uint8_t b[7];
int i;
-
+
b[0] = RCV_TEST;
memcpy( &b[1], r, 6 );
diff --git a/camlibs/directory/directory.c b/camlibs/directory/directory.c
index 3f311d9bf..caaa568a3 100644
--- a/camlibs/directory/directory.c
+++ b/camlibs/directory/directory.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -73,7 +73,7 @@
# endif
#else
# define textdomain(String) (String)
-# define gettext(String) (String)
+# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
@@ -86,8 +86,8 @@ static const struct {
const char *mime_type;
} mime_table[] = {
{"jpeg", GP_MIME_JPEG},
- {"jpg", GP_MIME_JPEG},
- {"thm", GP_MIME_JPEG},
+ {"jpg", GP_MIME_JPEG},
+ {"thm", GP_MIME_JPEG},
{"tif", GP_MIME_TIFF},
{"ppm", GP_MIME_PPM},
{"pgm", GP_MIME_PGM},
@@ -182,7 +182,7 @@ int camera_abilities (CameraAbilitiesList *list)
#ifdef DEBUG
a.file_operations = GP_FILE_OPERATION_PREVIEW |
- GP_FILE_OPERATION_DELETE |
+ GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_EXIF;
#else
a.file_operations = GP_FILE_OPERATION_DELETE |
@@ -271,7 +271,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
dir = gp_system_opendir ((char*) f);
if (!dir)
return (GP_ERROR);
-
+
/* Make sure we have 1 delimiter */
/* Count the files */
@@ -373,7 +373,7 @@ folder_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
filename = gp_system_filename (de);
if (*filename != '.') {
snprintf (buf, sizeof(buf), "%s%s", f, filename);
-
+
/* lstat ... do not follow symlinks */
if (lstat (buf, &st) != 0) {
int saved_errno = errno;
@@ -417,7 +417,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *file,
}
info->preview.fields = GP_FILE_INFO_NONE;
- info->file.fields = GP_FILE_INFO_SIZE |
+ info->file.fields = GP_FILE_INFO_SIZE |
GP_FILE_INFO_TYPE | GP_FILE_INFO_PERMISSIONS |
GP_FILE_INFO_MTIME;
@@ -719,7 +719,7 @@ camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
r = gp_file_open (file, "/usr/share/pixmaps/gnome-logo-large.png");
if (r < 0)
return (r);
-
+
return (GP_OK);
}
@@ -786,7 +786,7 @@ storage_info_func (CameraFilesystem *fs,
#endif
return GP_ERROR_NOT_SUPPORTED;
-}
+}
static CameraFilesystemFuncs fsfuncs = {
.file_list_func = file_list_func,
diff --git a/camlibs/enigma13/enigma13.c b/camlibs/enigma13/enigma13.c
index baa8e838a..331a50f47 100644
--- a/camlibs/enigma13/enigma13.c
+++ b/camlibs/enigma13/enigma13.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -63,7 +63,7 @@
/* the table of content of the camera
- it's filled in enigma_get_toc, and used in enigma_download_img */
+ it's filled in enigma_get_toc, and used in enigma_download_img */
static char* enigma13_static_toc=NULL;
@@ -93,7 +93,7 @@ static int enigma13_detect_storage_type (Camera *camera)
for (i=0;i<3;i++)
{
CHECK (gp_port_usb_msg_read (camera->port, 0x28, 0x0000,
- i, &buf[i], 0x01));
+ i, &buf[i], 0x01));
}
gp_log(GP_LOG_DEBUG, "enigma13","Camera storage information sdram: 0x%x flash 0x%x card: 0x%x\n"
, buf[0], buf[1], buf[2]);
@@ -109,7 +109,7 @@ static int enigma13_detect_storage_type (Camera *camera)
* This function deletes all the images
* supported (sdram, flash, card)
*
- * Status: not verified
+ * Status: not verified
*/
static int
enigma13_flash_delete_all(CameraFilesystem *fs, const char *folder, void *data,
@@ -119,7 +119,7 @@ enigma13_flash_delete_all(CameraFilesystem *fs, const char *folder, void *data,
gp_log(GP_LOG_DEBUG, "enigma13","Delete all files");
cam = data;
CHECK (gp_port_usb_msg_write (cam->port, 0x52, 0x0, 0x0, NULL, 0x0) );
- return GP_OK;
+ return GP_OK;
}
@@ -151,7 +151,7 @@ static int enigma13_wait_for_ready(Camera *camera)
#if 0
/*
* Get the number of images in cam
- *
+ *
* Status: Should work, but not used as enigma13_get_TOC does all.
*
*/
@@ -172,7 +172,7 @@ static int enigma13_get_filecount (Camera *camera, int *filecount)
/*
- * Get the table of contents (directory) from the cam
+ * Get the table of contents (directory) from the cam
*
* Verified: Yes
*/
@@ -235,14 +235,14 @@ static int enigma13_get_toc(Camera *camera, int *filecount, char** toc)
* int index : image index ( in gphoto point of view) -1 for real index
* char* toc : pointer to toc
* char** img_buf : returned image data
- * int* img_size : returned image data size
+ * int* img_size : returned image data size
*
*/
static int enigma13_download_img(Camera *camera, char *toc, int index, char **img_data, int *img_size)
{
uint8_t *p;
uint32_t file_size = 0, aligned_size = 0;
- char* buf=NULL;
+ char* buf=NULL;
int align=0;
char retbuf[2];
@@ -336,7 +336,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder, CameraList
/*
- * File operations
+ * File operations
*/
static int
get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
@@ -360,7 +360,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CHECK(enigma13_download_img(camera, enigma13_static_toc, image_no, &img_data, &img_size));
result = gp_file_append( file, img_data, img_size);
-
+
break;
}
default:
@@ -373,7 +373,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -392,7 +392,7 @@ camera_abilities (CameraAbilitiesList *list)
}
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "Digital Dream Enigma 1.3");
return (GP_OK);
@@ -405,7 +405,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
GPPortSettings settings;
diff --git a/camlibs/fuji/fuji.h b/camlibs/fuji/fuji.h
index 7bd8f3c30..13fb9c8d8 100644
--- a/camlibs/fuji/fuji.h
+++ b/camlibs/fuji/fuji.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/fuji/library.c b/camlibs/fuji/library.c
index b4585a1fd..1145dd096 100644
--- a/camlibs/fuji/library.c
+++ b/camlibs/fuji/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -148,7 +148,7 @@ camera_abilities (CameraAbilitiesList *list)
return (GP_OK);
}
-
+
static int
camera_about (Camera *camera, CameraText *about, GPContext *context)
{
@@ -326,7 +326,7 @@ pre_func (Camera *camera, GPContext *context)
CR (fuji_set_speed (camera, Speeds[i].speed, context));
/*
- * Change the port's speed and check if the camera is
+ * Change the port's speed and check if the camera is
* still there.
*/
settings.serial.speed = Speeds[i].bit_rate;
@@ -424,7 +424,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
CR (gp_widget_get_value (widget, &id));
CR (fuji_id_set (camera, id, context));
}
-
+
return (GP_OK);
}
@@ -531,8 +531,8 @@ camera_init (Camera *camera, GPContext *context)
CR (pre_func (camera, context));
/*
* What commands does this camera support? The question is not
- * easy to answer, as "One issue the DS7 has is that the
- * supported command list command is not supported"
+ * easy to answer, as "One issue the DS7 has is that the
+ * supported command list command is not supported"
* (Matt Martin <matt.martin@ieee.org>).
*/
if (fuji_get_cmds (camera, camera->pl->cmds, context) >= 0) {
diff --git a/camlibs/gsmart300/library.c b/camlibs/gsmart300/library.c
index 926372bf3..fb6b38e58 100644
--- a/camlibs/gsmart300/library.c
+++ b/camlibs/gsmart300/library.c
@@ -264,7 +264,7 @@ get_file_func (CameraFilesystem *fs, const char *folder,
Camera *camera = user_data;
int number, filetype;
- CHECK (number = gp_filesystem_number (camera->fs, folder, filename,
+ CHECK (number = gp_filesystem_number (camera->fs, folder, filename,
context));
switch (type) {
case GP_FILE_TYPE_NORMAL:
@@ -285,7 +285,7 @@ get_file_func (CameraFilesystem *fs, const char *folder,
static int
get_info_func (CameraFilesystem *fs, const char *folder,
- const char *filename, CameraFileInfo *info, void *data,
+ const char *filename, CameraFileInfo *info, void *data,
GPContext *context)
{
Camera *camera = data;
@@ -293,13 +293,13 @@ get_info_func (CameraFilesystem *fs, const char *folder,
struct GsmartFile *file;
/* Get the file number from the CameraFileSystem */
- CHECK (n = gp_filesystem_number (camera->fs, folder, filename,
+ CHECK (n = gp_filesystem_number (camera->fs, folder, filename,
context));
CHECK (gsmart300_get_file_info (camera->pl, n, &file));
- info->file.fields = GP_FILE_INFO_TYPE
- | GP_FILE_INFO_WIDTH
+ info->file.fields = GP_FILE_INFO_TYPE
+ | GP_FILE_INFO_WIDTH
| GP_FILE_INFO_HEIGHT;
if (file->mime_type == GSMART_FILE_TYPE_IMAGE) {
strcpy (info->file.type, GP_MIME_JPEG);
@@ -309,8 +309,8 @@ get_info_func (CameraFilesystem *fs, const char *folder,
info->file.width = file->width;
info->file.height = file->height;
- info->preview.fields = GP_FILE_INFO_TYPE
- | GP_FILE_INFO_WIDTH
+ info->preview.fields = GP_FILE_INFO_TYPE
+ | GP_FILE_INFO_WIDTH
| GP_FILE_INFO_HEIGHT;
strcpy (info->preview.type, GP_MIME_BMP);
@@ -325,7 +325,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
int n, c;
/* Get the file number from the CameraFileSystem */
- CHECK (n = gp_filesystem_number (camera->fs, folder, filename,
+ CHECK (n = gp_filesystem_number (camera->fs, folder, filename,
context));
CHECK (c = gp_filesystem_count (camera->fs, folder, context));
if (n + 1 != c) {
@@ -333,7 +333,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
gp_filesystem_name (fs, "/", c - 1, &name, context);
gp_context_error (context,
- _("Your camera only supports deleting "
+ _("Your camera only supports deleting "
"the last file on the camera. In this "
"case, this is file '%s'."), name);
return (GP_ERROR);
@@ -343,7 +343,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
}
static int
-delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
+delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
GPContext *context)
{
Camera *camera = data;
diff --git a/camlibs/hp215/crctab.h b/camlibs/hp215/crctab.h
index 99c2b5817..38490e738 100644
--- a/camlibs/hp215/crctab.h
+++ b/camlibs/hp215/crctab.h
@@ -39,14 +39,14 @@ static unsigned short crctab[256] = {
};
/*
- * updcrc macro derived from article Copyright 1986 Stephen Satchell.
+ * updcrc macro derived from article Copyright 1986 Stephen Satchell.
* NOTE: First srgument must be in range 0 to 255.
* Second argument is referenced twice.
- *
- * Programmers may incorporate any or all code into their programs,
- * giving proper credit within the source. Publication of the
- * source routines is permitted so long as proper credit is given
- * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
+ *
+ * Programmers may incorporate any or all code into their programs,
+ * giving proper credit within the source. Publication of the
+ * source routines is permitted so long as proper credit is given
+ * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
* Omen Technology.
*/
diff --git a/camlibs/hp215/hp215.c b/camlibs/hp215/hp215.c
index 2c7c8fdd4..e8e9976f0 100644
--- a/camlibs/hp215/hp215.c
+++ b/camlibs/hp215/hp215.c
@@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU Library General Public *
* License along with this program; see the file COPYING.LIB. If not, *
- * write to the
+ * write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
* *
@@ -414,7 +414,7 @@ hp_get_timeDate_cam (Camera *cam, char *txtbuffer, size_t txtbuffersize)
gp_log (GP_LOG_ERROR, "hp215", "too short reply block, %d bytes", msglen);
return GP_ERROR_IO;
}
-
+
memcpy (datebuf, msg, 15);
gp_log (GP_LOG_DEBUG, "hp215", "0f: %02x", msg[0x0f] & 0x7f);
gp_log (GP_LOG_DEBUG, "hp215", "10: %02x", msg[0x10] & 0x7f);
@@ -602,7 +602,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
0000 80 80 80 85 86 85-84 84 30 31 2f 30 32 2f ..........01/02/
0010 30 30 20 31 34 3a 34 38-00 80 81 80 80 80 80 81 00 14:48........
0020 88 89 84 81 80 80 80 80-80 81 00 00 00 00 00 00 ................
-0030 00 00 00 00 00 00 - ......
+0030 00 00 00 00 00 00 - ......
*/
xmsg = msg;
ret = decode_u32(&xmsg, &msglen, &val);
@@ -704,7 +704,7 @@ get_shoot_mode_table (Camera *camera) {
if (ret < GP_OK) return ret;
ret = decode_u32(&xmsg, &msglen, &val3);
if (ret < GP_OK) return ret;
-
+
gp_log (GP_LOG_DEBUG, "hp215", "shootmode table 0x%08x, 0x%08x, 0x%08x", val1, val2, val3);
cnt = val1+val2;
diff --git a/camlibs/hp215/hp215.h b/camlibs/hp215/hp215.h
index 344f15d69..67e0211ed 100644
--- a/camlibs/hp215/hp215.h
+++ b/camlibs/hp215/hp215.h
@@ -31,7 +31,7 @@
#define HP215_OK 0xe0e0
-typedef struct
+typedef struct
{
unsigned int hour;
unsigned int min;
diff --git a/camlibs/iclick/iclick.c b/camlibs/iclick/iclick.c
index 3de9c4415..c1ed4cfb6 100644
--- a/camlibs/iclick/iclick.c
+++ b/camlibs/iclick/iclick.c
@@ -1,23 +1,23 @@
/*
* iclick.c
*
- * Here, the functions which are needed to get data from the camera.
+ * Here, the functions which are needed to get data from the camera.
*
* Copyright (c) 2004 Theodore Kilgore <kilgota@auburn.edu>,
- * Stephen Pollei <stephen_pollei@comcast.net>.
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
- * The chip supported by this driver is presumed to be the SQ915.
+ * Stephen Pollei <stephen_pollei@comcast.net>.
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
+ * The chip supported by this driver is presumed to be the SQ915.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
#include <config.h>
@@ -36,7 +36,7 @@
#include <gphoto2/gphoto2-port.h>
#include "iclick.h"
-#define GP_MODULE "iclick"
+#define GP_MODULE "iclick"
#define SQWRITE gp_port_usb_msg_write
#define SQREAD gp_port_usb_msg_read
@@ -47,12 +47,12 @@
static unsigned char *
icl_read_data (GPPort *port, unsigned char *data, int size)
{
- gp_port_read (port, data, size);
+ gp_port_read (port, data, size);
return GP_OK;
}
*/
-int icl_access_reg (GPPort *port, enum icl_cmnd_type reg)
+int icl_access_reg (GPPort *port, enum icl_cmnd_type reg)
{
SQWRITE (port, 0x0c, reg,
(CONFIG == reg) ? CONFIG_I : 0,
@@ -60,7 +60,7 @@ int icl_access_reg (GPPort *port, enum icl_cmnd_type reg)
return GP_OK;
}
-int
+int
icl_init (GPPort *port, CameraPrivateLibrary *priv)
{
int i;
@@ -69,29 +69,29 @@ icl_init (GPPort *port, CameraPrivateLibrary *priv)
unsigned char *catalog_tmp;
priv->model=SQ_MODEL_ICLICK;
-
-
+
+
if (!catalog) return GP_ERROR_NO_MEMORY;
icl_reset (port);
icl_access_reg(port, CONFIG); /* Access config */
- gp_port_read(port, (char *)catalog, 0x8000);
+ gp_port_read(port, (char *)catalog, 0x8000);
/* Config data is in lines of 16 bytes. Each photo uses two lines. */
icl_read_picture_data(port, dummy_buf, 0x28000);
icl_reset (port);
- /* Photo list starts with line 0040. List terminates when we
+ /* Photo list starts with line 0040. List terminates when we
* the first entry of an even-numbered line is zero. */
- for (i=0; i< (0x8000 - 64) && catalog[i+64] ; i+=32)
+ for (i=0; i< (0x8000 - 64) && catalog[i+64] ; i+=32)
;
priv->nb_entries = i>>5;
if (i) {
catalog_tmp = realloc(catalog, i);
- if (catalog_tmp)
+ if (catalog_tmp)
priv->catalog = catalog_tmp;
- else
+ else
priv->catalog = catalog;
} else {
free(catalog);
@@ -122,8 +122,8 @@ icl_get_size (CameraPrivateLibrary *priv, int entry)
int
icl_get_width_height (CameraPrivateLibrary *priv, int entry, int *w, int *h)
{
- *w = 640;
- *h = 480;
+ *w = 640;
+ *h = 480;
return GP_OK;
}
@@ -132,11 +132,11 @@ int
icl_rewind (GPPort *port, CameraPrivateLibrary *priv)
{
static unsigned char dummy_buf[0x30000];
-
+
GP_DEBUG("REWIND cam's data pointer");
/* One has to read the catalog to rewind the data stream...
- * I don't know if it's by design.
+ * I don't know if it's by design.
* There ought to be something better to do... :-/
*/
@@ -161,7 +161,7 @@ icl_reset (GPPort *port)
return GP_OK;
}
-int
+int
icl_read_picture_data (GPPort *port, unsigned char *data, int size )
{
int remainder = size % 0x8000;
@@ -175,6 +175,6 @@ icl_read_picture_data (GPPort *port, unsigned char *data, int size )
gp_port_read (port, (char *)data + offset, remainder);
return GP_OK;
-}
+}
diff --git a/camlibs/iclick/iclick.h b/camlibs/iclick/iclick.h
index 6f7212529..315d30cc9 100644
--- a/camlibs/iclick/iclick.h
+++ b/camlibs/iclick/iclick.h
@@ -1,23 +1,23 @@
/*
* iclick.c
*
- * Here, the functions which are needed to get data from the camera.
+ * Here, the functions which are needed to get data from the camera.
*
- * Copyright (c) 2004 Theodore Kilgore <kilgota@auburn.edu>,
+ * Copyright (c) 2004 Theodore Kilgore <kilgota@auburn.edu>,
* Stephen Pollei <stephen_pollei@comcast.net>.
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
- * The chip supported by this driver is presumed to be the SQ915.
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
+ * The chip supported by this driver is presumed to be the SQ915.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
@@ -30,8 +30,8 @@
* A 'clip' is an autoshoot clip.
* A 'frame' is a single a picture out of a clip.
* An 'entry' corresponds to a line listed in the camera's configuration data,
- * part of which is a rudimentary allocation table (the 'catalog').
- * An entry, therefore, may be either a picture or a clip.
+ * part of which is a rudimentary allocation table (the 'catalog').
+ * An entry, therefore, may be either a picture or a clip.
* We reserve the word 'file' for the user fetchable file,
* that is, a picture or a frame.
*/
diff --git a/camlibs/iclick/library.c b/camlibs/iclick/library.c
index 84451abc6..1272773aa 100644
--- a/camlibs/iclick/library.c
+++ b/camlibs/iclick/library.c
@@ -111,7 +111,7 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
{
- strcpy(manual->text,
+ strcpy(manual->text,
_(
"Information regarding cameras with ID 0x2770:0x9153.\n\n"
"We do not recommend the use of a GUI program to access\n"
diff --git a/camlibs/jamcam/jamcam.c b/camlibs/jamcam/jamcam.c
index 66007a562..24a599d80 100644
--- a/camlibs/jamcam/jamcam.c
+++ b/camlibs/jamcam/jamcam.c
@@ -199,7 +199,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
raw = malloc(640*480 * 3);
ppm = malloc(640*480 * 3 + 200);
-
+
switch (type) {
case GP_FILE_TYPE_PREVIEW:
diff --git a/camlibs/jamcam/library.c b/camlibs/jamcam/library.c
index 258121ada..ba0d29338 100644
--- a/camlibs/jamcam/library.c
+++ b/camlibs/jamcam/library.c
@@ -148,7 +148,7 @@ static int jamcam_mmc_card_file_count (Camera *camera) {
jamcam_set_int_at_pos( buf, 4, position );
jamcam_write_packet( camera, buf, 8 );
-
+
jamcam_read_packet( camera, reply, 16 );
}
break;
@@ -268,7 +268,7 @@ int jamcam_file_count (Camera *camera) {
jamcam_set_int_at_pos( buf, 4, position );
jamcam_write_packet( camera, buf, 8 );
-
+
jamcam_read_packet( camera, reply, 16 );
}
@@ -385,7 +385,7 @@ static int jamcam_fetch_memory( Camera *camera, CameraFile *file,
break;
}
-
+
bytes_left -= bytes_to_read;
bytes_read += bytes_to_read;
diff --git a/camlibs/jd11/decomp.c b/camlibs/jd11/decomp.c
index b05956651..5ad5bc62c 100644
--- a/camlibs/jd11/decomp.c
+++ b/camlibs/jd11/decomp.c
@@ -1,16 +1,16 @@
/*
* Jenoptik JD11 Camera Driver
* Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -61,7 +61,7 @@ decomp_1byte(struct compstate *cs) {
int xbit;
while ((cs->cl[xcs].left>=0) && (cs->cl[xcs].right>=0)) {
- xbit = jd11_getbit(cs);
+ xbit = jd11_getbit(cs);
if (xbit)
xcs = cs->cl[xcs].left;
else
diff --git a/camlibs/jd11/decomp.h b/camlibs/jd11/decomp.h
index 789d3b999..819ca025e 100644
--- a/camlibs/jd11/decomp.h
+++ b/camlibs/jd11/decomp.h
@@ -1,16 +1,16 @@
/*
* Jenopt JD11 Camera Driver
- * Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
- *
+ * Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/jd11/jd11.c b/camlibs/jd11/jd11.c
index 6ec4e764a..7d49fd346 100644
--- a/camlibs/jd11/jd11.c
+++ b/camlibs/jd11/jd11.c
@@ -1,16 +1,16 @@
/*
* Jenoptik JD11 Camera Driver
* Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -43,13 +43,13 @@
#include "serial.h"
-int camera_id (CameraText *id)
+int camera_id (CameraText *id)
{
strcpy(id->text, "JD11");
return (GP_OK);
}
-int camera_abilities (CameraAbilitiesList *list)
+int camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -102,7 +102,7 @@ int camera_abilities (CameraAbilitiesList *list)
}
static int file_list_func (CameraFilesystem *fs, const char *folder,
- CameraList *list, void *data, GPContext *context)
+ CameraList *list, void *data, GPContext *context)
{
Camera *camera = (Camera*)data;
@@ -153,23 +153,23 @@ delete_all_func (CameraFilesystem *fs, const char* folder, void *data,
return jd11_erase_all(camera->port);
}
-static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
+static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
{
- strcpy(manual->text,
+ strcpy(manual->text,
_(
"The JD11 camera works rather well with this driver.\n"
"An RS232 interface @ 115 kbit is required for image transfer.\n"
"The driver allows you to get\n\n"
" - thumbnails (64x48 PGM format)\n"
" - full images (640x480 PPM format)\n"
- ));
+ ));
return (GP_OK);
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
- strcpy (about->text,
+ strcpy (about->text,
_("JD11\n"
"Marcus Meissner <marcus@jet.franken.de>\n"
"Driver for the Jenoptik JD11 camera.\n"
@@ -178,7 +178,7 @@ static int camera_about (Camera *camera, CameraText *about, GPContext *context)
return (GP_OK);
}
static int camera_config_get (Camera *camera, CameraWidget **window,
- GPContext *context)
+ GPContext *context)
{
CameraWidget *widget,*section;
float value_float,red,green,blue;
@@ -231,7 +231,7 @@ static int camera_config_get (Camera *camera, CameraWidget **window,
}
static int camera_config_set (Camera *camera, CameraWidget *window,
- GPContext *context)
+ GPContext *context)
{
float f,red,green,blue;
CameraWidget *widget,*section;
@@ -282,7 +282,7 @@ static CameraFilesystemFuncs fsfuncs = {
.delete_all_func = delete_all_func,
};
-int camera_init (Camera *camera, GPContext *context)
+int camera_init (Camera *camera, GPContext *context)
{
gp_port_settings settings;
diff --git a/camlibs/jd11/serial.c b/camlibs/jd11/serial.c
index 790e72ca7..dd263a359 100644
--- a/camlibs/jd11/serial.c
+++ b/camlibs/jd11/serial.c
@@ -1,16 +1,16 @@
/*
* Jenopt JD11 Camera Driver
- * Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
- *
+ * Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -273,7 +273,7 @@ static void cmd_TestFLASH(GPPort *port) {
fprintf(stderr,"TestFLASH: xcmd = %x.\n",xcmd);
}
-/* some kind of selftest ... shuts the shutters, beeps... only stops by
+/* some kind of selftest ... shuts the shutters, beeps... only stops by
* powercycle. */
static void cmd_79(GPPort *port) {
unsigned short xcmd;
@@ -351,7 +351,7 @@ jd11_erase_all(GPPort *port) {
}
/* This function reads all thumbnails at once and initializes the whole
- * camera filesystem. This can be done, because finding out how much
+ * camera filesystem. This can be done, because finding out how much
* pictures are on the camera is done by reading the whole preview picture
* stream anyway.
* And since the file infos are static mostly, why not just set them too at
@@ -401,7 +401,7 @@ jd11_index_reader(GPPort *port, CameraFilesystem *fs, GPContext *context) {
unsigned char thumb[64*48];
int y;
CameraFileInfo info;
-
+
ret = gp_file_new(&file);
if (ret!=GP_OK) {
free(indexbuf);
@@ -437,14 +437,14 @@ jd11_index_reader(GPPort *port, CameraFilesystem *fs, GPContext *context) {
/* we also get the fs info for free, so just set it */
info.file.fields = GP_FILE_INFO_TYPE |
- GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT |
+ GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT |
GP_FILE_INFO_SIZE;
strcpy(info.file.type,GP_MIME_PNM);
info.file.width = 640;
info.file.height = 480;
info.file.size = 640*480*3+strlen(IMGHEADER);
info.preview.fields = GP_FILE_INFO_TYPE |
- GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT |
+ GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT |
GP_FILE_INFO_SIZE;
strcpy(info.preview.type,GP_MIME_PGM);
info.preview.width = 64;
diff --git a/camlibs/jd11/serial.h b/camlibs/jd11/serial.h
index 795751a19..588a87a56 100644
--- a/camlibs/jd11/serial.h
+++ b/camlibs/jd11/serial.h
@@ -1,16 +1,16 @@
/*
* Jenopt JD11 Camera Driver
- * Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
- *
+ * Copyright 1999-2001 Marcus Meissner <marcus@jet.franken.de>
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/jl2005a/jl2005a.c b/camlibs/jl2005a/jl2005a.c
index 5f3a5e323..462dda2c8 100644
--- a/camlibs/jl2005a/jl2005a.c
+++ b/camlibs/jl2005a/jl2005a.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -32,23 +32,23 @@
#include "jl2005a.h"
-#define GP_MODULE "jl2005a"
+#define GP_MODULE "jl2005a"
-int
-jl2005a_init (Camera *camera, GPPort *port, CameraPrivateLibrary *priv)
+int
+jl2005a_init (Camera *camera, GPPort *port, CameraPrivateLibrary *priv)
{
GP_DEBUG("Running jl2005a_init\n");
jl2005a_shortquery(port, 0x0d); /* Supposed to get 0x08 */
jl2005a_shortquery(port, 0x1c); /* Supposed to get 0x01 */
jl2005a_shortquery(port, 0x20); /* Supposed to get 0x04 */
- gp_port_write (port, "\xab\x00", 2);
- gp_port_write (port, "\xa1\x02", 2);
gp_port_write (port, "\xab\x00", 2);
- gp_port_write (port, "\xa2\x02", 2);
+ gp_port_write (port, "\xa1\x02", 2);
+ gp_port_write (port, "\xab\x00", 2);
+ gp_port_write (port, "\xa2\x02", 2);
jl2005a_shortquery(port, 0x1d); /* 1 if camera is full, else 0 */
- gp_port_write (port, "\xab\x00", 2);
- gp_port_write (port, "\xa1\x00", 2);
+ gp_port_write (port, "\xab\x00", 2);
+ gp_port_write (port, "\xa1\x00", 2);
priv->nb_entries = jl2005a_shortquery(port, 0x0a)&0xff;
/* Number of pix returned here */
GP_DEBUG("%d entries in the camera\n", priv->nb_entries);
@@ -79,7 +79,7 @@ jl2005a_get_pic_data_size (GPPort *port, int n)
if (size == 0x3100)
size += 0x80;
GP_DEBUG("size = 0x%x\n", size);
- return (size);
+ return (size);
}
int
@@ -91,7 +91,7 @@ jl2005a_get_pic_width (GPPort *port)
width = (response&0xff);
response = (jl2005a_read_info_byte(port, 4) )&0xff;
width = ((response&0xff) << 8)|width;
- return (width);
+ return (width);
}
int
@@ -102,23 +102,23 @@ jl2005a_get_pic_height (GPPort *port)
response = (jl2005a_read_info_byte(port, 5) )&0xff;
height = (response&0xff);
response = (jl2005a_read_info_byte(port, 6) )&0xff;
- height = ((response&0xff)<< 8)|height;
+ height = ((response&0xff)<< 8)|height;
return (height);
}
-int
-set_usb_in_endpoint (Camera *camera, int inep)
+int
+set_usb_in_endpoint (Camera *camera, int inep)
{
GPPortSettings settings;
gp_port_get_settings ( camera ->port, &settings);
settings.usb.inep = inep;
GP_DEBUG("inep reset to %02X\n", inep);
return gp_port_set_settings ( camera ->port, settings);
-}
+}
-int
-jl2005a_read_picture_data (Camera *camera, GPPort *port,
- unsigned char *data, unsigned int size)
+int
+jl2005a_read_picture_data (Camera *camera, GPPort *port,
+ unsigned char *data, unsigned int size)
{
unsigned char *to_read;
int maxdl = 0xfa00;
@@ -132,9 +132,9 @@ jl2005a_read_picture_data (Camera *camera, GPPort *port,
* frame in a clip, is 0x01 if it is any clip frame after the initial
* one, and is zero if what is to be downloaded is a standalone photo.
* If clips will in the future be processed as AVI files, then there is
- * not any information to know how many frames are present, prior to
+ * not any information to know how many frames are present, prior to
* downloading them. There is only a starting point and an indicator
- * for each frame.
+ * for each frame.
*/
gp_port_write (port, "\xab\x00", 2);
gp_port_write (port, "\xa1\x04", 2);
@@ -145,8 +145,8 @@ jl2005a_read_picture_data (Camera *camera, GPPort *port,
gp_port_write (port, "\xab\x00", 2);
gp_port_write (port, "\xa2\x08", 2);
- /* Switch the inep over to 0x81. */
- set_usb_in_endpoint (camera, 0x81);
+ /* Switch the inep over to 0x81. */
+ set_usb_in_endpoint (camera, 0x81);
while (size > maxdl) {
ret = gp_port_read(port, (char *)to_read, maxdl);
if (ret < GP_OK) return ret;
@@ -157,7 +157,7 @@ jl2005a_read_picture_data (Camera *camera, GPPort *port,
ret = gp_port_read(port, (char *)to_read, size);
if (ret < GP_OK) return ret;
if (ret < size) return GP_ERROR;
- /* Switch the inep back to 0x84. */
+ /* Switch the inep back to 0x84. */
set_usb_in_endpoint (camera, 0x84);
return GP_OK;
}
@@ -165,18 +165,18 @@ jl2005a_read_picture_data (Camera *camera, GPPort *port,
int
jl2005a_reset (Camera *camera, GPPort *port)
{
- int i;
+ int i;
gp_port_write (port,"\xab\x00" , 2);
gp_port_write (port, "\xa1\x00", 2);
gp_port_write (port, "\xab\x00", 2);
gp_port_write (port, "\xa2\x02", 2);
- for (i=0; i < 4; i++)
+ for (i=0; i < 4; i++)
jl2005a_shortquery(port, 0x1d);
/* Supposed to get something like 0x01, 0x01, 0x01, 0x00 */
return GP_OK;
}
-int jl2005a_read_info_byte(GPPort *port, int n)
+int jl2005a_read_info_byte(GPPort *port, int n)
{
char response;
char command[2];
@@ -227,7 +227,7 @@ int jl2005a_decompress (unsigned char *inp, unsigned char *outp, int width,
outp[(4*i+5)*width+j])/2;
}
}
- if (width == 176)
+ if (width == 176)
memmove(outp+6*width, outp, (height-6)*width);
return 0;
diff --git a/camlibs/jl2005a/jl2005a.h b/camlibs/jl2005a/jl2005a.h
index 7b90cb7c8..4de7d5668 100644
--- a/camlibs/jl2005a/jl2005a.h
+++ b/camlibs/jl2005a/jl2005a.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -37,14 +37,14 @@ struct _CameraPrivateLibrary {
};
-int jl2005a_init (Camera *camera, GPPort *port,
+int jl2005a_init (Camera *camera, GPPort *port,
CameraPrivateLibrary *priv);
int jl2005a_get_pic_data_size (GPPort *port, int n);
int jl2005a_get_pic_width (GPPort *port);
int jl2005a_get_pic_height (GPPort *port);
int set_usb_in_endpoint (Camera *camera, int inep);
int jl2005a_read_picture_data ( Camera *camera,
- GPPort *port, unsigned char *data,
+ GPPort *port, unsigned char *data,
unsigned int size);
int jl2005a_reset (Camera *camera, GPPort *port);
int jl2005a_read_info_byte(GPPort *port, int n);
diff --git a/camlibs/jl2005c/img_enhance.c b/camlibs/jl2005c/img_enhance.c
index 25e631f3f..956879078 100644
--- a/camlibs/jl2005c/img_enhance.c
+++ b/camlibs/jl2005c/img_enhance.c
@@ -159,17 +159,17 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
{
d = (data[x + 0] << 8) * r_factor + 8;
d >>= 8;
- if (d > 0xff)
+ if (d > 0xff)
d = 0xff;
data[x + 0] = d;
d = (data[x + 1] << 8) * g_factor + 8;
d >>= 8;
- if (d > 0xff)
+ if (d > 0xff)
d = 0xff;
data[x + 1] = d;
d = (data[x + 2] << 8) * b_factor + 8;
d >>= 8;
- if (d > 0xff)
+ if (d > 0xff)
d = 0xff;
data[x + 2] = d;
}
diff --git a/camlibs/jl2005c/jl2005bcd_decompress.c b/camlibs/jl2005c/jl2005bcd_decompress.c
index b545f04a4..005bf8e52 100644
--- a/camlibs/jl2005c/jl2005bcd_decompress.c
+++ b/camlibs/jl2005c/jl2005bcd_decompress.c
@@ -19,7 +19,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
diff --git a/camlibs/jl2005c/jpeg_memsrcdest.c b/camlibs/jl2005c/jpeg_memsrcdest.c
index b65310e9b..d3dd788ed 100644
--- a/camlibs/jl2005c/jpeg_memsrcdest.c
+++ b/camlibs/jl2005c/jpeg_memsrcdest.c
@@ -273,7 +273,7 @@ jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
{
my_dest_ptr dest;
- /* The destination object is made permanent so that multiple JPEG
+ /* The destination object is made permanent so that multiple JPEG
* images can be written to the same file without re-executing
* jpeg_stdio_dest.
* This makes it dangerous to use this manager and a different
diff --git a/camlibs/jl2005c/library.c b/camlibs/jl2005c/library.c
index 1c31590e7..c896a455e 100644
--- a/camlibs/jl2005c/library.c
+++ b/camlibs/jl2005c/library.c
@@ -460,7 +460,7 @@ camera_init (Camera *camera, GPContext *context)
GP_DEBUG ("Initializing the camera\n");
ret = gp_port_get_settings(camera->port,&settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
switch (camera->port->type) {
case GP_PORT_SERIAL:
diff --git a/camlibs/kodak/dc120/dc120.c b/camlibs/kodak/dc120/dc120.c
index 5e3649e10..9c191a924 100644
--- a/camlibs/kodak/dc120/dc120.c
+++ b/camlibs/kodak/dc120/dc120.c
@@ -71,7 +71,7 @@ int camera_abilities (CameraAbilitiesList *list) {
a.speed[4] = 115200;
a.speed[5] = 0;
a.operations = GP_OPERATION_CAPTURE_IMAGE;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
@@ -81,7 +81,7 @@ int camera_abilities (CameraAbilitiesList *list) {
}
/** Parses a path for a folder and returns folder number and card */
-static int find_folder( Camera *camera, const char *folder,
+static int find_folder( Camera *camera, const char *folder,
int *from_card, int *folder_nr, GPContext *context)
{
CameraList *albums = NULL;
@@ -89,13 +89,13 @@ static int find_folder( Camera *camera, const char *folder,
int folder_len;
int i;
char *dc120_folder_card = _("CompactFlash Card");
-
+
if( folder[0] != '/' ) {
return (GP_ERROR);
}
folder++;
-
+
if( folder[0] == '\0') {
/* From memory */
*from_card = FALSE;
@@ -112,7 +112,7 @@ static int find_folder( Camera *camera, const char *folder,
*from_card = FALSE;
folder--; /* step back to slash */
}
-
+
if ( (folder[0] == 0) ||
(folder[0] == '/' && folder[1] == 0) ) { /* ok, finished */
*folder_nr = 0;
@@ -120,25 +120,25 @@ static int find_folder( Camera *camera, const char *folder,
}
else if( folder[0] != '/' )
return (GP_ERROR);
-
+
folder++; /* remove slash */
-
+
/* Have trailing slash */
folder_len = strlen(folder);
if (folder[folder_len-1] == '/') {
folder_len--;
}
-
+
/* ok, now we have a album. first get all albums */
if( gp_list_new( &albums ) != (GP_OK) ) {
return (GP_ERROR);
}
-
+
if( dc120_get_albums(camera, *from_card, albums, context) != (GP_OK) ) {
gp_list_free( albums );
return (GP_ERROR);
}
-
+
/* no check if such a album exist */
for( i = 0; i<gp_list_count( albums ); i++ )
{
@@ -151,7 +151,7 @@ static int find_folder( Camera *camera, const char *folder,
return (GP_OK);
}
}
-
+
/* oh, we did not find the folder. bummer. */
gp_list_free( albums );
return (GP_ERROR);
@@ -165,39 +165,39 @@ static int folder_list_func (CameraFilesystem *fs, const char *folder,
int folder_nr;
Camera *camera = data;
char *dc120_folder_card = _("CompactFlash Card");
-
+
res = find_folder( camera, folder, &from_card, &folder_nr, context);
if( res != (GP_OK) ) {
return res;
}
-
+
if( !from_card && folder_nr==0 ) {
gp_list_append(list, dc120_folder_card, NULL);
return (dc120_get_albums(camera, from_card, list, context));
- }
+ }
else if( from_card && folder_nr==0 ) {
return (dc120_get_albums(camera, from_card, list, context));
- }
+ }
else {
return (GP_OK);
}
}
static int file_list_func (CameraFilesystem *fs, const char *folder,
- CameraList *list, void *data, GPContext *context)
+ CameraList *list, void *data, GPContext *context)
{
int res;
int from_card;
int folder_nr;
Camera *camera = data;
-
+
res = find_folder( camera, folder, &from_card, &folder_nr, context);
if( res != (GP_OK) ) {
return res;
}
-
+
return dc120_get_filenames(camera, from_card, folder_nr, list, context);
-
+
/* Save the order of the pics (wtf: no filename access on dc120???) */
}
@@ -205,7 +205,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
static int camera_file_action (Camera *camera, int action, CameraFile *file,
const char *folder, const char *filename,
- GPContext *context)
+ GPContext *context)
{
CameraList *files = NULL;
const char* file_name;
@@ -214,27 +214,27 @@ static int camera_file_action (Camera *camera, int action, CameraFile *file,
char *dot;
int picnum=0;
int result = GP_OK;
-
+
/* first find the file */
int from_card;
int folder_nr;
-
+
result = find_folder( camera, folder, &from_card, &folder_nr, context );
if( result != (GP_OK) ) {
return result;
}
-
+
result = gp_list_new( &files );
if( result != GP_OK ) {
goto fail;
}
-
+
result = dc120_get_filenames(camera, from_card, folder_nr, files, context);
if( result != GP_OK ) {
goto fail;
}
-
-
+
+
/* now we have the list, search for the file. */
file_nr = -1;
for( i = 0; i<gp_list_count( files ); i++ ) {
@@ -245,18 +245,18 @@ static int camera_file_action (Camera *camera, int action, CameraFile *file,
}
}
gp_list_free( files );
-
-
+
+
if( file_nr == -1 ) { /* not found */
return GP_ERROR;
}
-
-
+
+
picnum = gp_filesystem_number(camera->fs, folder, filename, context);
if (picnum < 0)
return picnum;
-
-
+
+
if (action == DC120_ACTION_PREVIEW) { /* FIXME: marcus, fix type */
dot = strrchr(filename, '.');
if( dot && strlen( dot )>3 ) {
@@ -275,7 +275,7 @@ static int camera_file_action (Camera *camera, int action, CameraFile *file,
static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
- CameraFile *file, void *data, GPContext *context)
+ CameraFile *file, void *data, GPContext *context)
{
Camera *camera = data;
@@ -291,14 +291,14 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
}
}
-static int delete_file_func (CameraFilesystem *fs, const char *folder,
+static int delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = data;
int retval;
- retval = camera_file_action (camera, DC120_ACTION_DELETE, NULL,
+ retval = camera_file_action (camera, DC120_ACTION_DELETE, NULL,
folder, filename, context);
return (retval);
@@ -327,15 +327,15 @@ static int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePat
/* Set the filename */
strcpy(path->folder, "/");
- CHECK_RESULT (gp_filesystem_append (camera->fs,
- path->folder,
+ CHECK_RESULT (gp_filesystem_append (camera->fs,
+ path->folder,
path->name, context));
return (GP_OK);
}
static int camera_summary (Camera *camera, CameraText *summary,
- GPContext *context)
+ GPContext *context)
{
static char summary_string[2048] = "";
char buff[1024];
@@ -344,41 +344,41 @@ static int camera_summary (Camera *camera, CameraText *summary,
if (dc120_get_status (camera, &status, context))
{
strcpy(summary_string,"Kodak DC120\n");
-
+
snprintf(buff,1024,"Camera Identification: %s\n",status.camera_id);
strcat(summary_string,buff);
-
+
snprintf(buff,1024,"Camera Type: %d\n",status.camera_type_id);
strcat(summary_string,buff);
-
+
snprintf(buff,1024,"Firmware: %d.%d\n",status.firmware_major,status.firmware_minor);
strcat(summary_string,buff);
-
+
snprintf(buff,1024,"Battery Status: %d\n",status.batteryStatusId);
strcat(summary_string,buff);
-
+
snprintf(buff,1024,"AC Status: %d\n",status.acStatusId);
strcat(summary_string,buff);
-
+
strftime(buff,1024,"Time: %a, %d %b %Y %T\n",localtime((time_t *)&status.time));
strcat(summary_string,buff);
-
+
snprintf(buff,1024,"Total Pictures Taken: %d\n",
status.taken_pict_mem + status.taken_pict_card );
strcat(summary_string,buff);
-
+
}
-
+
strcpy(summary->text, summary_string);
-
+
return (GP_OK);
}
static int camera_manual (Camera *camera, CameraText *manual,
- GPContext *context)
+ GPContext *context)
{
- strcpy (manual->text,
+ strcpy (manual->text,
_("The Kodak DC120 camera uses the KDC file format "
"for storing images. If you want to view the images you "
"download from your camera, you will need to download "
@@ -388,9 +388,9 @@ static int camera_manual (Camera *camera, CameraText *manual,
return (GP_OK);
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
- strcpy(about->text,
+ strcpy(about->text,
_("Kodak DC120 Camera Library\n"
"Scott Fritzinger <scottf@gphoto.net>\n"
"Camera Library for the Kodak DC120 camera.\n"
diff --git a/camlibs/kodak/dc120/dc120.h b/camlibs/kodak/dc120/dc120.h
index e4fa8765a..b5f4e29e5 100644
--- a/camlibs/kodak/dc120/dc120.h
+++ b/camlibs/kodak/dc120/dc120.h
@@ -46,27 +46,27 @@
List albums (folders)
Packet: 44 00 00 00 00 00 00 1A
-
+
Response:
ALBUMNAME1\0\0\0\0\0ALBUMNAME2\0\0\0\0\0ALBUMNAME3\0\0\0\0\0 [...] CS
(258 bytes, 15 byte fixed-with fields in multiple packets)
- CS (checksum)
+ CS (checksum)
Picture count in album
Packet: 45 LOC 00 00 AN 00 00 1A
-
+
LOC (location): 00 (memory), 01 (card)
AN (album #)
Response: NP4 NP3 NP2 NP1 [11 reserved bytes] CS
-
+
NP4 - NP1 (number of pictures): MSB to LSB number of pictures
CS (checksum)
Set Active album for next taken picture
Packet: 49 00 AN 00 00 00 00 1A
-
+
AN (album #)
Set Image Quality
diff --git a/camlibs/kodak/dc120/library.c b/camlibs/kodak/dc120/library.c
index 50fafb117..6b98bac4a 100644
--- a/camlibs/kodak/dc120/library.c
+++ b/camlibs/kodak/dc120/library.c
@@ -85,7 +85,7 @@ dc120_response_ok (unsigned char response) {
*/
static int
dc120_packet_write (Camera *camera, char *packet, int size, int read_response) {
-
+
/* Writes the packet and returns the result */
int x=0;
@@ -97,7 +97,7 @@ write_again:
usleep(SLEEP_TIMEOUT * 1000);
/* Return error if too many retries */
- if (x++ > RETRIES)
+ if (x++ > RETRIES)
return (GP_ERROR);
if (gp_port_write(camera->port, packet, size) < GP_OK)
@@ -148,7 +148,7 @@ static int dc120_packet_read_data (Camera *camera, CameraFile *file, char *cmd_p
id = gp_context_progress_start (context, num_packets, _("Getting data..."));
read_data_write_again:
- if (dc120_packet_write(camera, cmd_packet, 8, 1) < GP_OK)
+ if (dc120_packet_write(camera, cmd_packet, 8, 1) < GP_OK)
return (GP_ERROR);
packets_received = 0;
@@ -171,7 +171,7 @@ read_data_write_again:
return (GP_ERROR);
}
break;
- default:
+ default:
packets_received++;
/* Default is packet was OK */
@@ -214,7 +214,7 @@ read_data_write_again:
gp_context_progress_stop (context, id);
if ((unsigned char)p[0] != CANCL)
- /* Read in command completed.
+ /* Read in command completed.
(Shouldn't we check for command completed (Ralf)) */
dc120_packet_read(camera, p, 1);
@@ -222,7 +222,7 @@ read_data_write_again:
}
-int dc120_set_speed (Camera *camera, int speed)
+int dc120_set_speed (Camera *camera, int speed)
{
int error = GP_OK;
GPPortSettings settings;
@@ -274,7 +274,7 @@ int dc120_set_speed (Camera *camera, int speed)
break;
}
- if (dc120_packet_write(camera, p, 8, 1) == GP_ERROR)
+ if (dc120_packet_write(camera, p, 8, 1) == GP_ERROR)
{
error = GP_ERROR;
goto fail;
@@ -316,7 +316,7 @@ int dc120_get_status (Camera *camera, Kodak_dc120_status *status, GPContext *con
free (p);
return (GP_ERROR);
}
-
+
memset((char*)status,0,sizeof(*status));
status->camera_type_id = data[1];
@@ -324,14 +324,14 @@ int dc120_get_status (Camera *camera, Kodak_dc120_status *status, GPContext *con
status->firmware_minor = data[3];
status->batteryStatusId = data[8];
status->acStatusId = data[9];
-
+
/* seconds since unix epoc */
status->time = CAMERA_EPOC + (
- data[12] * 0x1000000 +
- data[13] * 0x10000 +
- data[14] * 0x100 +
+ data[12] * 0x1000000 +
+ data[13] * 0x10000 +
+ data[14] * 0x100 +
data[15]) / 2;
-
+
status->af_mode = data[16] & 0x0f;
status->zoom_mode = (data[16] & 0x30)>>4;
status->flash_charged = data[18];
@@ -340,9 +340,9 @@ int dc120_get_status (Camera *camera, Kodak_dc120_status *status, GPContext *con
status->exposure_compensation = (data[2]&0x40?-1:1) * (data[21] & 0x3f);
status->light_value = data[22];
status->manual_exposure = data[23];
- status->exposure_time = (data[24] * 0x1000000 +
- data[25] * 0x10000 +
- data[26] * 0x100 +
+ status->exposure_time = (data[24] * 0x1000000 +
+ data[25] * 0x10000 +
+ data[26] * 0x100 +
data[27]) / 2;
status->shutter_delay = data[29];
status->memory_card = data[30];
@@ -352,18 +352,18 @@ int dc120_get_status (Camera *camera, Kodak_dc120_status *status, GPContext *con
status->distance_format = data[34];
status->taken_pict_mem = data[36] * 0x100 + data[37];
for( i=0; i<4; i++ ) {
- status->remaining_pic_mem[i] =
- data[46+i*2] * 0x100 +
+ status->remaining_pic_mem[i] =
+ data[46+i*2] * 0x100 +
data[47+i*2];
}
status->taken_pict_card = data[56] * 0x100 + data[57];
for( i=0; i<4; i++ ) {
- status->remaining_pic_card[i] =
- data[66+i*2] * 0x100 +
+ status->remaining_pic_card[i] =
+ data[66+i*2] * 0x100 +
data[67+i*2];
}
- strncpy( status->card_id, data + 77, 32 );
- strncpy( status->camera_id, data + 90, 32 );
+ strncpy( status->card_id, data + 77, 32 );
+ strncpy( status->camera_id, data + 90, 32 );
}
@@ -408,7 +408,7 @@ int dc120_get_albums (Camera *camera, int from_card, CameraList *list, GPContext
return (GP_OK);
}
-int dc120_get_filenames (Camera *camera, int from_card, int album_number, CameraList *list, GPContext *context)
+int dc120_get_filenames (Camera *camera, int from_card, int album_number, CameraList *list, GPContext *context)
{
CameraFile *file;
int x;
@@ -491,7 +491,7 @@ static int dc120_get_file_preview (Camera *camera, CameraFile *file, int file_nu
return (GP_OK);
}
-static int dc120_get_file (Camera *camera, CameraFile *file, int file_number, char *cmd_packet, int *size, GPContext *context)
+static int dc120_get_file (Camera *camera, CameraFile *file, int file_number, char *cmd_packet, int *size, GPContext *context)
{
CameraFile *size_file; /* file used to determine the filesize */
char *p;
@@ -524,8 +524,8 @@ static int dc120_get_file (Camera *camera, CameraFile *file, int file_number, ch
free (p);
return (GP_ERROR);
}
-
- *size = (unsigned char)file_data[offset + 16] * 256*256*256 +
+
+ *size = (unsigned char)file_data[offset + 16] * 256*256*256 +
(unsigned char)file_data[offset + 17] * 256*256 +
(unsigned char)file_data[offset + 18] * 256 +
(unsigned char)file_data[offset + 19];
@@ -536,7 +536,7 @@ static int dc120_get_file (Camera *camera, CameraFile *file, int file_number, ch
if (dc120_packet_read_data(camera, file, cmd_packet, size, 1024, context)==GP_ERROR)
return (GP_ERROR);
-
+
return (GP_OK);
}
@@ -554,10 +554,10 @@ static int dc120_wait_for_completion (Camera *camera, GPContext *context) {
retval = dc120_packet_read(camera, p, 1);
switch (retval) {
- case GP_ERROR:
- return (GP_ERROR);
+ case GP_ERROR:
+ return (GP_ERROR);
break;
- case GP_ERROR_TIMEOUT:
+ case GP_ERROR_TIMEOUT:
break;
default:
done = 1;
@@ -578,9 +578,9 @@ static int dc120_delete_file (Camera *camera, char *cmd_packet, GPContext *conte
if (dc120_packet_write(camera, cmd_packet, 8, 1) == GP_ERROR)
return (GP_ERROR);
-
+
if (dc120_packet_read(camera, p, 1)==GP_ERROR)
- return (GP_ERROR);
+ return (GP_ERROR);
if (dc120_wait_for_completion(camera, context)==GP_ERROR)
return (GP_ERROR);
@@ -588,7 +588,7 @@ static int dc120_delete_file (Camera *camera, char *cmd_packet, GPContext *conte
return (GP_OK);
}
-int dc120_file_action (Camera *camera, int action, int from_card, int album_number,
+int dc120_file_action (Camera *camera, int action, int from_card, int album_number,
int file_number, CameraFile *file, GPContext *context) {
int retval;
@@ -625,11 +625,11 @@ int dc120_file_action (Camera *camera, int action, int from_card, int album_numb
return (retval);
}
-int dc120_capture (Camera *camera, CameraFilePath *path, GPContext *context)
+int dc120_capture (Camera *camera, CameraFilePath *path, GPContext *context)
{
int retval;
char *p = dc120_packet_new(0x77);
-
+
/* Take the picture to Flash memory */
if (dc120_packet_write(camera, p, 8, 1) == GP_ERROR) {
retval = (GP_ERROR);
diff --git a/camlibs/kodak/dc120/library.h b/camlibs/kodak/dc120/library.h
index d4b509fb1..5f2e666d2 100644
--- a/camlibs/kodak/dc120/library.h
+++ b/camlibs/kodak/dc120/library.h
@@ -27,7 +27,7 @@
#define DC120_ACTION_IMAGE 0
#define DC120_ACTION_PREVIEW 1
-#define DC120_ACTION_DELETE 2
+#define DC120_ACTION_DELETE 2
/* Status structure. Copied from dc210, thus may not fit. */
typedef struct {
@@ -65,7 +65,7 @@ int dc120_set_speed (Camera *camera, int speed);
int dc120_get_status (Camera *camera, Kodak_dc120_status *status, GPContext *context);
int dc120_get_albums (Camera *camera, int from_card, CameraList *list, GPContext *context);
int dc120_get_filenames(Camera *camera, int from_card, int album_number, CameraList *list, GPContext *context);
-int dc120_file_action (Camera *camera, int action, int from_card, int album_number,
+int dc120_file_action (Camera *camera, int action, int from_card, int album_number,
int file_number, CameraFile *file, GPContext *context);
int dc120_capture (Camera *camera, CameraFilePath *path, GPContext *context);
diff --git a/camlibs/kodak/dc210/dc210.c b/camlibs/kodak/dc210/dc210.c
index 133b70930..8bb3bdffa 100644
--- a/camlibs/kodak/dc210/dc210.c
+++ b/camlibs/kodak/dc210/dc210.c
@@ -84,16 +84,16 @@ int camera_abilities (CameraAbilitiesList *list) {
}
static int file_list_func (CameraFilesystem *fs, const char *folder,
- CameraList *list, void *data, GPContext *context)
+ CameraList *list, void *data, GPContext *context)
{
Camera *camera = data;
-
+
return dc210_get_filenames(camera, list, context);
}
static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
- CameraFile *file, void *data, GPContext *context)
+ CameraFile *file, void *data, GPContext *context)
{
Camera *camera = data;
@@ -109,9 +109,9 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
return GP_OK;
}
-static int delete_file_func (CameraFilesystem *fs, const char *folder,
+static int delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = data;
@@ -124,7 +124,7 @@ static int get_info_func (CameraFilesystem *fs, const char *folder, const char *
{
Camera *camera = data;
dc210_picture_info picinfo;
-
+
if (dc210_get_picture_info_by_name(camera, &picinfo, file) == GP_ERROR)
return GP_ERROR;
@@ -176,7 +176,7 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
int i;
char * wvalue;
char stringbuffer[12];
-
+
dc210_status status;
if (dc210_get_status(camera, &status) == GP_ERROR) return GP_ERROR;
@@ -192,9 +192,9 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, _("FlashPix"));
switch (status.file_type){
- case DC210_FILE_TYPE_JPEG:
+ case DC210_FILE_TYPE_JPEG:
gp_widget_set_value (widget, _("JPEG")); break;
- case DC210_FILE_TYPE_FPX:
+ case DC210_FILE_TYPE_FPX:
gp_widget_set_value (widget, _("FlashPix")); break;
};
gp_widget_get_value (widget, &wvalue);
@@ -205,9 +205,9 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, _("1152 x 864"));
switch (status.resolution){
- case DC210_FILE_640:
+ case DC210_FILE_640:
gp_widget_set_value (widget, _("640 x 480")); break;
- case DC210_FILE_1152:
+ case DC210_FILE_1152:
gp_widget_set_value (widget, _("1152 x 864")); break;
default:
DC210_DEBUG("Undefined value for file resolution.\n"); break;
@@ -221,11 +221,11 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, _("High (good quality)"));
switch (status.compression_type){
- case DC210_LOW_COMPRESSION:
+ case DC210_LOW_COMPRESSION:
gp_widget_set_value (widget, _("Low (best quality)")); break;
- case DC210_MEDIUM_COMPRESSION:
+ case DC210_MEDIUM_COMPRESSION:
gp_widget_set_value (widget, _("Medium (better quality)")); break;
- case DC210_HIGH_COMPRESSION:
+ case DC210_HIGH_COMPRESSION:
gp_widget_set_value (widget, _("High (good quality)")); break;
};
gp_widget_get_value (widget, &wvalue);
@@ -243,17 +243,17 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, _("Macro"));
switch (status.zoom){
- case DC210_ZOOM_58:
+ case DC210_ZOOM_58:
gp_widget_set_value (widget, _("58 mm")); break;
- case DC210_ZOOM_51:
+ case DC210_ZOOM_51:
gp_widget_set_value (widget, _("51 mm")); break;
- case DC210_ZOOM_41:
+ case DC210_ZOOM_41:
gp_widget_set_value (widget, _("41 mm")); break;
- case DC210_ZOOM_34:
+ case DC210_ZOOM_34:
gp_widget_set_value (widget, _("34 mm")); break;
- case DC210_ZOOM_29:
+ case DC210_ZOOM_29:
gp_widget_set_value (widget, _("29 mm")); break;
- case DC210_ZOOM_MACRO:
+ case DC210_ZOOM_MACRO:
gp_widget_set_value (widget, _("Macro")); break;
};
gp_widget_get_value (widget, &wvalue);
@@ -273,11 +273,11 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_add_choice (widget, _("None"));
switch (status.flash){
- case DC210_FLASH_AUTO:
+ case DC210_FLASH_AUTO:
gp_widget_set_value (widget, _("Auto")); break;
- case DC210_FLASH_FORCE:
+ case DC210_FLASH_FORCE:
gp_widget_set_value (widget, _("Force")); break;
- case DC210_FLASH_NONE:
+ case DC210_FLASH_NONE:
gp_widget_set_value (widget, _("None")); break;
};
gp_widget_get_value (widget, &wvalue);
@@ -300,7 +300,7 @@ camera_get_config (Camera *camera, CameraWidget **window, GPContext *context)
gp_widget_append (section, widget);
gp_widget_set_value (widget, dc210_system_time_callback);
gp_widget_set_info (widget, _("Set clock in camera"));
-
+
gp_camera_get_abilities(camera, &abilities);
gp_port_get_settings (camera->port, &settings);
gp_widget_new (GP_WIDGET_MENU, _("Port speed"), &widget);
@@ -449,11 +449,11 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
gp_widget_get_value (w2, &w2value);
switch(wvalue[0]){
case 'A':
- dc210_set_flash(camera, DC210_FLASH_AUTO,
+ dc210_set_flash(camera, DC210_FLASH_AUTO,
w2value[1] == 'n' ? 1 : 0);
break;
case 'F':
- dc210_set_flash(camera, DC210_FLASH_FORCE,
+ dc210_set_flash(camera, DC210_FLASH_FORCE,
w2value[1] == 'n' ? 1 : 0);
break;
case 'N':
@@ -472,7 +472,7 @@ static int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePat
return (GP_ERROR_NOT_SUPPORTED);
};
- if (dc210_capture(camera, path, context) == GP_ERROR)
+ if (dc210_capture(camera, path, context) == GP_ERROR)
return GP_ERROR;
return gp_filesystem_append (camera->fs, path->folder, path->name, context);
@@ -493,7 +493,7 @@ static int camera_capture_preview (Camera* camera, CameraFile* file, GPContext *
};
static int camera_summary (Camera *camera, CameraText *summary,
- GPContext *context)
+ GPContext *context)
{
static char summary_string[2048] = "";
char buff[1024];
@@ -502,7 +502,7 @@ static int camera_summary (Camera *camera, CameraText *summary,
if (GP_OK == dc210_get_status (camera, &status))
{
strcpy(summary_string,"Kodak DC210\n");
-
+
snprintf(buff,1024,_("Pictures in camera: %d\n"),
status.numPicturesInCamera);
strcat(summary_string,buff);
@@ -523,35 +523,35 @@ static int camera_summary (Camera *camera, CameraText *summary,
strcat(summary_string,buff);
switch (status.file_type){
- case DC210_FILE_TYPE_JPEG:
+ case DC210_FILE_TYPE_JPEG:
snprintf(buff, 1024, _("Filetype: JPEG (")); break;
- case DC210_FILE_TYPE_FPX:
+ case DC210_FILE_TYPE_FPX:
snprintf(buff, 1024, _("Filetype: FlashPix (")); break;
};
strcat(summary_string, buff);
-
+
switch (status.compression_type){
- case DC210_LOW_COMPRESSION:
+ case DC210_LOW_COMPRESSION:
snprintf(buff, 1024, _("low compression, ")); break;
- case DC210_MEDIUM_COMPRESSION:
+ case DC210_MEDIUM_COMPRESSION:
snprintf(buff, 1024, _("medium compression, ")); break;
- case DC210_HIGH_COMPRESSION:
+ case DC210_HIGH_COMPRESSION:
snprintf(buff, 1024, _("high compression, ")); break;
- default:
+ default:
snprintf(buff, 1024, _("unknown compression %d, "), status.compression_type); break;
};
strcat(summary_string, buff);
-
+
switch (status.resolution){
- case DC210_FILE_640:
+ case DC210_FILE_640:
snprintf(buff, 1024, "640x480 pixel)\n"); break;
- case DC210_FILE_1152:
+ case DC210_FILE_1152:
snprintf(buff, 1024, "1152x864 pixel)\n"); break;
- default:
+ default:
snprintf(buff, 1024, _("unknown resolution %d)\n"), status.resolution); break;
};
strcat(summary_string, buff);
-
+
/* battery check still doesn't work */
/* switch (status.battery){
case 0: snprintf(buff,1024,"Battery charge is good\n"); break;
@@ -559,37 +559,37 @@ static int camera_summary (Camera *camera, CameraText *summary,
case 2: snprintf(buff,1024,"Battery is not charged\n"); break;
};
strcat(summary_string,buff);*/
-
+
if (status.acstatus)
snprintf(buff,1024,_("AC adapter is connected.\n"));
else
snprintf(buff,1024,_("AC adapter is not connected.\n"));
strcat(summary_string,buff);
-
+
/* time string, do not change the % escapes */
strftime(buff,1024,_("Time: %a, %d %b %Y %T\n"),
localtime((time_t *)&status.time));
strcat(summary_string,buff);
-
+
switch (status.zoom){
- case DC210_ZOOM_58:
+ case DC210_ZOOM_58:
snprintf(buff, 1024, _("Zoom: 58 mm\n")); break;
- case DC210_ZOOM_51:
+ case DC210_ZOOM_51:
snprintf(buff, 1024, _("Zoom: 51 mm\n")); break;
- case DC210_ZOOM_41:
+ case DC210_ZOOM_41:
snprintf(buff, 1024, _("Zoom: 41 mm\n")); break;
- case DC210_ZOOM_34:
+ case DC210_ZOOM_34:
snprintf(buff, 1024, _("Zoom: 34 mm\n")); break;
- case DC210_ZOOM_29:
+ case DC210_ZOOM_29:
snprintf(buff, 1024, _("Zoom: 29 mm\n")); break;
- case DC210_ZOOM_MACRO:
+ case DC210_ZOOM_MACRO:
snprintf(buff, 1024, _("Zoom: macro\n")); break;
- default:
- snprintf(buff, 1024, _("Unknown zoom mode %d\n"),
+ default:
+ snprintf(buff, 1024, _("Unknown zoom mode %d\n"),
status.zoom); break;
};
strcat(summary_string,buff);
-
+
if (status.exp_compensation > -5 && status.exp_compensation < 4)
snprintf(buff, 1024, _("Exposure compensation: %s\n"), exp_comp[status.exp_compensation + 4]);
else
@@ -597,14 +597,14 @@ static int camera_summary (Camera *camera, CameraText *summary,
strcat(summary_string,buff);
switch (status.flash){
- case DC210_FLASH_AUTO:
+ case DC210_FLASH_AUTO:
snprintf(buff, 1024, _("Flash mode: auto, ")); break;
- case DC210_FLASH_FORCE:
+ case DC210_FLASH_FORCE:
snprintf(buff, 1024, _("Flash mode: force, ")); break;
- case DC210_FLASH_NONE:
+ case DC210_FLASH_NONE:
snprintf(buff, 1024, _("Flash mode: off\n")); break;
- default:
- snprintf(buff, 1024, _("Unknown flash mode %d, "),
+ default:
+ snprintf(buff, 1024, _("Unknown flash mode %d, "),
status.flash); break;
};
strcat(summary_string,buff);
@@ -625,22 +625,22 @@ static int camera_summary (Camera *camera, CameraText *summary,
snprintf(buff,1024, _("Card name: %s\nFree space on card: %d kB\n"),
status.album_name,
status.card_status.space);
-
+
strcat(summary_string,buff);
}
else{
DC210_DEBUG("Couldn't get summary for camera\n");
};
-
+
strcpy(summary->text, summary_string);
-
+
return (GP_OK);
}
static int camera_manual (Camera *camera, CameraText *manual,
- GPContext *context)
+ GPContext *context)
{
strcpy (manual->text, _("This library has been tested with a Kodak DC 215 Zoom camera. "
"It might work also with DC 200 and DC 210 cameras. "
@@ -651,9 +651,9 @@ static int camera_manual (Camera *camera, CameraText *manual,
return (GP_OK);
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
- strcpy(about->text,
+ strcpy(about->text,
_("Camera Library for the Kodak DC215 Zoom camera.\n"
"Michael Koltan <koltan@gmx.de>\n"));
diff --git a/camlibs/kodak/dc210/dc210.h b/camlibs/kodak/dc210/dc210.h
index 57340e131..2aed3b6cd 100644
--- a/camlibs/kodak/dc210/dc210.h
+++ b/camlibs/kodak/dc210/dc210.h
@@ -73,29 +73,29 @@ typedef struct {
} dc210_card_status;
typedef struct {
- char camera_type_id;
- char firmwareMajor;
- char firmwareMinor;
- char battery;
- char acstatus;
- long int time;
- dc210_zoom_type zoom;
- char flash_charged;
- dc210_compression_type compression_type;
+ char camera_type_id;
+ char firmwareMajor;
+ char firmwareMinor;
+ char battery;
+ char acstatus;
+ long int time;
+ dc210_zoom_type zoom;
+ char flash_charged;
+ dc210_compression_type compression_type;
signed char exp_compensation;
dc210_flash_type flash;
char preflash;
- dc210_resolution_type resolution;
- dc210_file_type_type file_type;
- int totalPicturesTaken;
- int totalFlashesFired;
- int numPicturesInCamera;
+ dc210_resolution_type resolution;
+ dc210_file_type_type file_type;
+ int totalPicturesTaken;
+ int totalFlashesFired;
+ int numPicturesInCamera;
dc210_card_status card_status;
- int remainingLow;
- int remainingMedium;
- int remainingHigh;
+ int remainingLow;
+ int remainingMedium;
+ int remainingHigh;
int card_space;
- char album_name[12];
+ char album_name[12];
} dc210_status;
typedef struct {
@@ -193,7 +193,7 @@ typedef struct {
#define DC210_ILLEGAL_PACKET 0xE3
#define DC210_CANCEL 0xE4
#define DC210_BUSY 0xF0
-
+
/* initialization */
int dc210_init_port (Camera *camera);
diff --git a/camlibs/kodak/dc210/library.c b/camlibs/kodak/dc210/library.c
index e7b8c4eb8..8b54837f4 100644
--- a/camlibs/kodak/dc210/library.c
+++ b/camlibs/kodak/dc210/library.c
@@ -61,11 +61,11 @@ static char oldstatus[DC210_STATUS_SIZE];
****************************************************************************/
-static void cfa2ppm
+static void cfa2ppm
(CameraFile * file)
{
/* this is a very quick and dirty hack to convert cfa into ppm */
- unsigned char buf[THUMBHEIGHT][THUMBWIDTH];
+ unsigned char buf[THUMBHEIGHT][THUMBWIDTH];
unsigned char rgb[THUMBHEIGHT][THUMBWIDTH][3];
unsigned char val;
unsigned int addval;
@@ -102,7 +102,7 @@ static void cfa2ppm
rgb[y][x+1][RED] = buf[y][x+1];
rgb[y+1][x][RED] = buf[y][x+1];
rgb[y+1][x+1][RED] = buf[y][x+1];
- rgb[y][x][BLUE] = buf[y+1][x];
+ rgb[y][x][BLUE] = buf[y+1][x];
rgb[y][x+1][BLUE] = buf[y+1][x];
rgb[y+1][x][BLUE] = buf[y+1][x];
rgb[y+1][x+1][BLUE] = buf[y+1][x];
@@ -112,7 +112,7 @@ static void cfa2ppm
for ( y = 1; y < THUMBHEIGHT - 2; y+= 2)
for ( x = 0; x < THUMBWIDTH - 2; x +=2){
/* 2 missing green values */
- addval = rgb[y][x][GREEN] + rgb[y][x+2][GREEN]
+ addval = rgb[y][x][GREEN] + rgb[y][x+2][GREEN]
+ rgb[y-1][x+1][GREEN] + rgb[y+1][x+1][GREEN];
rgb[y][x+1][GREEN] = addval / 4;
@@ -124,7 +124,7 @@ static void cfa2ppm
addval = rgb[y-1][x][RED] + rgb[y+1][x][RED];
rgb[y][x][RED] = addval / 2;
- addval = rgb[y-1][x][RED] + rgb[y-1][x+2][RED]
+ addval = rgb[y-1][x][RED] + rgb[y-1][x+2][RED]
+ rgb[y+1][x][RED] + rgb[y+1][x+2][RED];
rgb[y][x+1][RED] = addval / 4;
@@ -135,7 +135,7 @@ static void cfa2ppm
addval = rgb[y][x-1][BLUE] + rgb[y][x+1][BLUE];
rgb[y][x][BLUE] = addval / 2;
- addval = rgb[y][x-1][BLUE] + rgb[y][x+1][BLUE]
+ addval = rgb[y][x-1][BLUE] + rgb[y][x+1][BLUE]
+ rgb[y+2][x-1][BLUE] + rgb[y+2][x+1][BLUE];
rgb[y+1][x][BLUE] = addval / 4;
@@ -177,8 +177,8 @@ static void dc210_cmd_packet_init
};
-static int dc210_write_single_char
-(Camera *camera, unsigned char response)
+static int dc210_write_single_char
+(Camera *camera, unsigned char response)
{
/* utility procedure to write a single character */
@@ -193,7 +193,7 @@ static int dc210_write_single_char
};
-static int dc210_read_single_char
+static int dc210_read_single_char
(Camera *camera, unsigned char * response)
{
@@ -214,18 +214,18 @@ static int dc210_read_single_char
return GP_ERROR;
};
};
-
+
return GP_OK;
};
-
+
return GP_ERROR_TIMEOUT;
};
/* Command execution */
-static int dc210_execute_command
+static int dc210_execute_command
(Camera *camera, char *cmd)
{
@@ -244,7 +244,7 @@ static int dc210_execute_command
int i,k ;
unsigned char response;
signed char error;
-
+
dc210_cmd_error = DC210_CMD_OKAY;
for (i = 0; i < RETRIES; i++){
@@ -269,7 +269,7 @@ static int dc210_execute_command
return error;
};
};
-
+
switch (response){
case DC210_COMMAND_ACK:
DC210_DEBUG("Command 0x%02X acknowledged.\n", (unsigned char) cmd[0]);
@@ -286,13 +286,13 @@ static int dc210_execute_command
};
break;
};
-
+
};
/* command does definitely not work */
DC210_DEBUG("Command definitely didn't work.\n");
-
+
return GP_ERROR;
};
@@ -331,7 +331,7 @@ static int dc210_write_command_packet
if (error < 0) return GP_ERROR;
if (answer == DC210_CORRECT_PACKET) return GP_OK;
-
+
if (answer != DC210_ILLEGAL_PACKET) {
DC210_DEBUG("Strange answer to command packet: 0x%02X.\n", answer);
return GP_ERROR;
@@ -345,11 +345,11 @@ static int dc210_write_command_packet
};
-static int dc210_wait_for_response
+static int dc210_wait_for_response
(Camera *camera, int expect_busy, GPContext *context)
{
/* Waits for a command to finish.
- Expects either a timeout, a DC210_BUSY,
+ Expects either a timeout, a DC210_BUSY,
a DC210_COMMAND_COMPLETE or a
DC210_PACKET_FOLLOWING; all other answers
are considered errors */
@@ -393,8 +393,8 @@ static int dc210_wait_for_response
};
-static int dc210_read_single_block
-(Camera *camera, unsigned char * b, int blocksize)
+static int dc210_read_single_block
+(Camera *camera, unsigned char * b, int blocksize)
{
int i, k, error;
@@ -413,7 +413,7 @@ static int dc210_read_single_block
error = 0;
break;
};
-
+
if (error) return GP_ERROR;
if (dc210_read_single_char(camera, (unsigned char *)&cs_read) < 0)
@@ -436,7 +436,7 @@ static int dc210_read_single_block
};
static int dc210_read_to_file
-(Camera *camera, CameraFile * f, int blocksize, long int expectsize, GPContext *context)
+(Camera *camera, CameraFile * f, int blocksize, long int expectsize, GPContext *context)
{
int packets, k, l, fatal_error, packet_following;
@@ -469,7 +469,7 @@ static int dc210_read_to_file
};
/* read checksum */
if (dc210_read_single_char(camera, &cs_read) == GP_ERROR){
- free(b);
+ free(b);
return GP_ERROR;
};
/* test checksum */
@@ -544,7 +544,7 @@ static int dc210_set_option (Camera * camera, char command, unsigned int value,
default:
return GP_ERROR;
};
-
+
if (dc210_execute_command(camera, cmd) == GP_ERROR) return GP_ERROR;
if (dc210_wait_for_response(camera, 0, NULL) != DC210_COMMAND_COMPLETE) return GP_ERROR;
@@ -572,7 +572,7 @@ int dc210_set_flash (Camera * camera, dc210_flash_type flash, char preflash){
int dc210_set_zoom (Camera * camera, dc210_zoom_type zoom){
return dc210_set_option(camera, DC210_SET_ZOOM, zoom, 1);
-
+
};
int dc210_set_file_type (Camera * camera, dc210_file_type_type file_type){
@@ -635,7 +635,7 @@ static int dc210_format_card (Camera * camera, char * album_name, GPContext * co
while (NULL != (subst = strchr(data, ' '))) *subst = '_';
if (strlen(data) < 8) strncat(data, "________", 8 - strlen(data));
};
-
+
DC210_DEBUG("Album name is '%s'\n", data);
dc210_cmd_init(cmd, DC210_CARD_FORMAT);
@@ -719,7 +719,7 @@ static int dc210_check_battery (Camera *camera){
char cmd[8];
dc210_cmd_init(cmd, DC210_CHECK_BATTERY);
-
+
if (dc210_execute_command(camera, cmd) == GP_ERROR) return GP_ERROR;
if (dc210_wait_for_response(camera, 0, NULL) != DC210_COMMAND_COMPLETE) return GP_ERROR;
@@ -751,9 +751,9 @@ int dc210_init_port (Camera *camera){
gp_port_set_settings (camera->port, settings);
/* ok, run a dummy command; if the camera was off,
- this will activate it and set the speed to 9600;
+ this will activate it and set the speed to 9600;
but the command will return an error;
- It makes no sense to shorten the timout time,
+ It makes no sense to shorten the timout time,
because the camera may need up to 10 seconds (information
of the manual) to startup */
if (dc210_check_battery(camera) == GP_OK) return GP_OK;
@@ -763,7 +763,7 @@ int dc210_init_port (Camera *camera){
and has enough power.
This is the time to send a break to reset the speed
to 9600 */
-
+
gp_camera_set_port_speed(camera, 9600);
gp_port_send_break(camera->port, 300);
usleep(300 * 1000);
@@ -804,7 +804,7 @@ int dc210_set_speed (Camera *camera, int speed) {
GPPortSettings settings;
dc210_cmd_init((char*)cmd, DC210_SET_SPEED);
-
+
switch (speed) {
case 9600:
cmd[2] = 0x96; cmd[3] = 0x00; break;
@@ -829,12 +829,12 @@ int dc210_set_speed (Camera *camera, int speed) {
DC210_DEBUG("Port speed set to %d.\n", speed);
return GP_OK;
-
+
};
/****** Picture actions *****/
-int dc210_take_picture
+int dc210_take_picture
(Camera * camera, GPContext * context)
{
char cmd[8];
@@ -852,7 +852,7 @@ int dc210_take_picture
};
-int dc210_delete_picture
+int dc210_delete_picture
(Camera * camera, unsigned int picno)
{
@@ -870,7 +870,7 @@ int dc210_delete_picture
};
-int dc210_delete_last_picture
+int dc210_delete_last_picture
(Camera * camera )
{
@@ -886,7 +886,7 @@ int dc210_delete_last_picture
};
-int dc210_delete_picture_by_name
+int dc210_delete_picture_by_name
(Camera * camera, const char * filename )
{
@@ -904,7 +904,7 @@ int dc210_delete_picture_by_name
};
-int dc210_download_last_picture
+int dc210_download_last_picture
(Camera * camera, CameraFile *file, dc210_picture_type type, GPContext *context)
{
@@ -961,7 +961,7 @@ static int dc210_close_card
int dc210_download_picture_by_name
(Camera * camera, CameraFile *file, const char *filename, dc210_picture_type type, GPContext *context)
{
-
+
char cmd[8];
char cmd_packet[DC210_CMD_DATA_SIZE];
dc210_picture_info picinfo;
@@ -988,15 +988,15 @@ int dc210_download_picture_by_name
case DC210_FULL_PICTURE:
if (picinfo.file_type == DC210_FILE_TYPE_JPEG)
gp_file_set_mime_type(file, GP_MIME_JPEG);
- if (dc210_read_to_file(camera, file,
- DC210_CARD_BLOCK_SIZE,
+ if (dc210_read_to_file(camera, file,
+ DC210_CARD_BLOCK_SIZE,
picinfo.picture_size, context) == GP_ERROR)
return GP_ERROR;
break;
case DC210_CFA_THUMB:
/* this thumb type is much faster to download, because it has just
a 6th of the size of rgb data */
- if (dc210_read_to_file(camera, file,
+ if (dc210_read_to_file(camera, file,
DC210_DOWNLOAD_BLOCKSIZE, 48 * 72, NULL) == GP_ERROR)
return GP_ERROR;
/* convert cfa data to rgb: */
@@ -1008,16 +1008,16 @@ int dc210_download_picture_by_name
worth the 6 times longer download time */
gp_file_set_mime_type(file, GP_MIME_PPM);
gp_file_append(file, ppmheader, sizeof(ppmheader) - 1);
- if (dc210_read_to_file(camera, file,
+ if (dc210_read_to_file(camera, file,
DC210_DOWNLOAD_BLOCKSIZE, 96 * 72 * 3, NULL) == GP_ERROR)
return GP_ERROR;
break;
};
-
+
return GP_OK;
};
-int dc210_capture (Camera *camera, CameraFilePath *path, GPContext *context)
+int dc210_capture (Camera *camera, CameraFilePath *path, GPContext *context)
{
dc210_status status;
@@ -1031,9 +1031,9 @@ int dc210_capture (Camera *camera, CameraFilePath *path, GPContext *context)
pictures_in_camera = status.numPicturesInCamera;
if (dc210_take_picture(camera, context) == GP_ERROR) return GP_ERROR;
-
+
if (dc210_get_status(camera, &status) == GP_ERROR) return GP_ERROR;
- if (pictures_in_camera == status.numPicturesInCamera) return GP_ERROR;
+ if (pictures_in_camera == status.numPicturesInCamera) return GP_ERROR;
if (dc210_get_picture_info(camera, &picinfo, status.numPicturesInCamera) == GP_ERROR) return GP_ERROR;
@@ -1058,20 +1058,20 @@ int dc210_get_picture_number (Camera *camera, const char * filename){
if (dc210_get_status(camera, &status) == GP_ERROR) return -1;
for (i = 1; i <= status.numPicturesInCamera; i++){
-
+
if (dc210_get_picture_info(camera, &picinfo, i) == GP_ERROR) return -1;
-
+
if (strcmp(picinfo.image_name, filename) == 0){
return i;
};
-
- };
+
+ };
return -1;
};
-int dc210_get_filenames (Camera *camera, CameraList *list, GPContext *context)
+int dc210_get_filenames (Camera *camera, CameraList *list, GPContext *context)
{
char cmd[8];
CameraFile *file;
@@ -1085,7 +1085,7 @@ int dc210_get_filenames (Camera *camera, CameraList *list, GPContext *context)
dc210_cmd_init(cmd, DC210_GET_ALBUM_FILENAMES);
dc210_execute_command(camera, cmd);
-
+
dc210_read_to_file(camera, file, DC210_DIRLIST_SIZE, 0, NULL);
gp_file_get_data_and_size(file, &data, &datasize);
@@ -1117,9 +1117,9 @@ static void dc210_picinfo_from_block (dc210_picture_info * picinfo, unsigned cha
picinfo->picture_number = data[6] * 0x100 + data[7];
picinfo->picture_size = data[8] * 0x1000000 + data[9] * 0x10000 + data[10] * 0x100 + data[11];
picinfo->preview_size = 96 * 72 * 3 + sizeof(ppmheader);
- picinfo->picture_time = CAMERA_GET_EPOC + ((data[12] * 0x1000000 +
- data[13] * 0x10000 +
- data[14] * 0x100 +
+ picinfo->picture_time = CAMERA_GET_EPOC + ((data[12] * 0x1000000 +
+ data[13] * 0x10000 +
+ data[14] * 0x100 +
data[15]) >> 1);
picinfo->flash_used = data[16];
picinfo->flash = data[17];
@@ -1131,7 +1131,7 @@ static void dc210_picinfo_from_block (dc210_picture_info * picinfo, unsigned cha
picinfo->exposure_time = data[28] * 0x1000000 + data[29] * 0x10000 + data[30] * 0x100 + data[31];
strncpy(picinfo->image_name, (char *)&data[32], 12);
picinfo->image_name[12] = 0;
-
+
}
int dc210_get_picture_info (Camera *camera, dc210_picture_info *picinfo, unsigned int picno) {
@@ -1143,13 +1143,13 @@ int dc210_get_picture_info (Camera *camera, dc210_picture_info *picinfo, unsigne
dc210_cmd_init(cmd, DC210_GET_PICINFO);
cmd[3] = pic_offset & 0xFF;
cmd[2] = (pic_offset >> 8) & 0xFF;
-
+
if (dc210_execute_command(camera, cmd) == GP_ERROR) return GP_ERROR;
if (dc210_read_single_block(camera, data, DC210_PICINFO_SIZE) == GP_ERROR) return GP_ERROR;
if (dc210_wait_for_response(camera, 0, NULL) != DC210_COMMAND_COMPLETE) return GP_ERROR;
-
+
dc210_picinfo_from_block(picinfo, data);
-
+
return GP_OK;
};
@@ -1159,17 +1159,17 @@ int dc210_get_picture_info_by_name (Camera *camera, dc210_picture_info *picinfo,
char cmd[8];
char cmd_packet[DC210_CMD_DATA_SIZE];
unsigned char data[DC210_CARD_BLOCK_SIZE];
-
+
dc210_cmd_init(cmd, DC210_CARD_GET_PICINFO);
dc210_cmd_packet_init(cmd_packet, filename);
-
+
if (dc210_execute_command(camera, cmd) == GP_ERROR) return GP_ERROR;
if (dc210_write_command_packet(camera, cmd_packet) == GP_ERROR) return GP_ERROR;
if (dc210_read_single_block(camera, data, DC210_CARD_BLOCK_SIZE) == GP_ERROR) return GP_ERROR;
if (dc210_wait_for_response(camera, 0, NULL) != DC210_COMMAND_COMPLETE) return GP_ERROR;
-
+
dc210_picinfo_from_block(picinfo, data);
-
+
return GP_OK;
};
@@ -1183,7 +1183,7 @@ int dc210_get_status (Camera *camera, dc210_status *status) {
char data[DC210_STATUS_SIZE];
char cmd[8];
- /* you have to check the battery status explicitly
+ /* you have to check the battery status explicitly
before reading the status table*/
dc210_check_battery(camera);
@@ -1191,7 +1191,7 @@ int dc210_get_status (Camera *camera, dc210_status *status) {
dc210_get_card_status(camera, &(status->card_status));
dc210_cmd_init(cmd, DC210_GET_STATUS);
-
+
if (dc210_execute_command(camera, cmd) == GP_ERROR) return GP_ERROR;
if (dc210_read_single_block(camera, (unsigned char *)data, DC210_STATUS_SIZE) == GP_ERROR) return GP_ERROR;
if (dc210_wait_for_response(camera, 0, NULL) != DC210_COMMAND_COMPLETE) return GP_ERROR;
@@ -1203,7 +1203,7 @@ int dc210_get_status (Camera *camera, dc210_status *status) {
else{
for (i = 0; i < DC210_STATUS_SIZE; i++){
if (oldstatus[i] != data[i] && (i < 12 || i > 15)){
- DC210_DEBUG("Statusdata differs at offset %03d (old: 0x%02X, new: 0x%02X)\n",
+ DC210_DEBUG("Statusdata differs at offset %03d (old: 0x%02X, new: 0x%02X)\n",
i, (unsigned char) oldstatus[i], (unsigned char) data[i]);
};
};
@@ -1215,13 +1215,13 @@ int dc210_get_status (Camera *camera, dc210_status *status) {
status->firmwareMinor = data[3];
status->battery = data[8];
status->acstatus = data[9];
-
+
/* seconds since unix epoc */
- status->time = CAMERA_GET_EPOC + ((unsigned char) data[12] * 0x1000000 +
- (unsigned char) data[13] * 0x10000 +
- (unsigned char) data[14] * 0x100 +
+ status->time = CAMERA_GET_EPOC + ((unsigned char) data[12] * 0x1000000 +
+ (unsigned char) data[13] * 0x10000 +
+ (unsigned char) data[14] * 0x100 +
(unsigned char) data[15]) / 2;
-
+
status->zoom = data[16];
status->compression_type = data[19];
status->flash = data[20];
@@ -1257,7 +1257,7 @@ static int dc210_read_dummy_packet(Camera * camera){
checksum = 0;
lastanswer = 0;
for ( i = 0; i < 2048; i++){
-
+
error = gp_port_read(camera->port, &answer, 1);
if (error < 0){
@@ -1301,7 +1301,7 @@ static int dc210_test_command
dc210_cmd_init(cmd, cmdbyte);
- memcpy(cmd + 2, databytes, 4);
+ memcpy(cmd + 2, databytes, 4);
/* okay, write the command and wait for acknowledge */
@@ -1323,7 +1323,7 @@ static int dc210_test_command
DC210_DEBUG("Sorry, command 0x%02X not acknowledged.\n", cmdbyte);
return GP_OK;
default:
- DC210_DEBUG("Unexpected response 0x%02X to command 0x%02X.\n",
+ DC210_DEBUG("Unexpected response 0x%02X to command 0x%02X.\n",
answer, cmdbyte);
return GP_OK;
};
@@ -1360,7 +1360,7 @@ static int dc210_test_command
DC210_DEBUG("Camera is busy.\n");
goto wait_finish;
default:
- DC210_DEBUG("Unexpected response 0x%02X to command 0x%02X.\n",
+ DC210_DEBUG("Unexpected response 0x%02X to command 0x%02X.\n",
answer, cmdbyte);
return GP_OK;
};
diff --git a/camlibs/kodak/dc240/dc240.c b/camlibs/kodak/dc240/dc240.c
index e77cc752a..0e7c95979 100644
--- a/camlibs/kodak/dc240/dc240.c
+++ b/camlibs/kodak/dc240/dc240.c
@@ -57,7 +57,7 @@
#include "library.h"
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "kodak-dc240");
@@ -82,7 +82,7 @@ static const struct camera_to_usb {
currently supported.
*/
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
int i;
@@ -102,26 +102,26 @@ camera_abilities (CameraAbilitiesList *list)
a.usb_vendor = camera_to_usb[i].idVendor;
a.usb_product = camera_to_usb[i].idProduct;
a.operations = GP_OPERATION_CAPTURE_IMAGE;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
-
+
gp_abilities_list_append(list, a);
}
return (GP_OK);
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
dc240_close (camera, context);
-
+
return (GP_OK);
}
static int
folder_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
- void *data, GPContext *context)
+ void *data, GPContext *context)
{
Camera *camera = data;
@@ -130,7 +130,7 @@ folder_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
- void *data, GPContext *context)
+ void *data, GPContext *context)
{
Camera *camera = data;
@@ -140,7 +140,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
static int
get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = data;
@@ -163,13 +163,13 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
{
Camera *camera = data;
- return (dc240_file_action (camera, DC240_ACTION_DELETE, NULL, folder,
+ return (dc240_file_action (camera, DC240_ACTION_DELETE, NULL, folder,
filename, context));
}
static int
camera_capture (Camera *camera, CameraCaptureType type,
- CameraFilePath *path, GPContext *context)
+ CameraFilePath *path, GPContext *context)
{
int result;
@@ -190,46 +190,46 @@ camera_capture (Camera *camera, CameraCaptureType type,
}
static int
-camera_summary (Camera *camera, CameraText *summary, GPContext *context)
+camera_summary (Camera *camera, CameraText *summary, GPContext *context)
{
char buf [32 * 1024];
char temp [1024];
int retval;
DC240StatusTable table;
-
+
retval = dc240_get_status (camera, &table, context);
if (retval == GP_OK) {
sprintf (buf, _("Model: Kodak %s\n"), dc240_convert_type_to_camera(table.cameraType));
sprintf (temp, _("Firmware version: %d.%02d\n"), table.fwVersInt, table.fwVersDec);
strcat (buf, temp);
- sprintf (temp, _("Battery status: %s, AC Adapter: %s\n"),
- dc240_get_battery_status_str(table.battStatus),
+ sprintf (temp, _("Battery status: %s, AC Adapter: %s\n"),
+ dc240_get_battery_status_str(table.battStatus),
dc240_get_ac_status_str(table.acAdapter));
strcat (buf, temp);
sprintf (temp, _("Number of pictures: %d\n"), table.numPict);
strcat (buf, temp);
- sprintf (temp, _("Space remaining: High: %d, Medium: %d, Low: %d\n"),
+ sprintf (temp, _("Space remaining: High: %d, Medium: %d, Low: %d\n"),
table.remPictHigh, table.remPictMed, table.remPictLow);
strcat (buf, temp);
-
+
sprintf (temp, _("Memory card status (%d): %s\n"), table.memCardStatus,
dc240_get_memcard_status_str(table.memCardStatus));
strcat (buf, temp);
- sprintf (temp, _("Total pictures captured: %d, Flashes fired: %d\n"),
- table.totalPictTaken, table.totalStrobeFired);
+ sprintf (temp, _("Total pictures captured: %d, Flashes fired: %d\n"),
+ table.totalPictTaken, table.totalStrobeFired);
strcat (buf, temp);
-
-
+
+
strcpy(summary->text, buf);
}
return retval;
}
static int
-camera_about (Camera *camera, CameraText *about, GPContext *context)
+camera_about (Camera *camera, CameraText *about, GPContext *context)
{
- strcpy (about->text,
+ strcpy (about->text,
_("Kodak DC240 Camera Library\n"
"Scott Fritzinger <scottf@gphoto.net> and Hubert Figuiere <hfiguiere@teaser.fr>\n"
"Camera Library for the Kodak DC240, DC280, DC3400 and DC5000 cameras.\n"
@@ -246,11 +246,11 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
int ret, selected_speed = 0;
GPPortSettings settings;
-
+
/* First, set up all the function pointers */
camera->functions->exit = camera_exit;
camera->functions->capture = camera_capture;
@@ -284,7 +284,7 @@ camera_init (Camera *camera, GPContext *context)
default:
return (GP_ERROR_UNKNOWN_PORT);
}
-
+
ret = gp_port_set_settings (camera->port, settings);
if (ret < 0)
return (ret);
@@ -294,16 +294,16 @@ camera_init (Camera *camera, GPContext *context)
return (ret);
if (camera->port->type == GP_PORT_SERIAL) {
- char buf[8];
+ char buf[8];
/* Reset the camera to 9600 */
gp_port_send_break(camera->port, 1);
/* Used to have a 1500 msec pause here to give
* the camera time to reset - but, since
* the serial port sometimes returns a garbage
- * character or two after the break, we do
+ * character or two after the break, we do
* a couple of TIMEOUT (750 msec) pauses here
- * force the delay as well as flush the port
+ * force the delay as well as flush the port
*/
gp_port_read(camera->port, buf, 8);
gp_port_read(camera->port, buf, 8);
@@ -317,7 +317,7 @@ camera_init (Camera *camera, GPContext *context)
ret = dc240_open (camera);
if (ret < 0)
return (ret);
-
+
ret = dc240_packet_set_size (camera, HPBS+2);
if (ret < 0)
return (ret);
diff --git a/camlibs/kodak/dc240/library.c b/camlibs/kodak/dc240/library.c
index 0a4873268..547d5d896 100644
--- a/camlibs/kodak/dc240/library.c
+++ b/camlibs/kodak/dc240/library.c
@@ -709,7 +709,7 @@ int dc240_get_status (Camera *camera, DC240StatusTable *table, GPContext *contex
if (retval == GP_OK) {
retval = gp_file_get_data_and_size (file, &fdata, &fsize);
- if (retval != GP_OK) goto exit;
+ if (retval != GP_OK) goto exit;
if (fsize != 256) {
GP_DEBUG ("wrong status packet size ! Size is %ld", fsize);
retval = GP_ERROR;
diff --git a/camlibs/kodak/dc240/library.h b/camlibs/kodak/dc240/library.h
index d3ad7448d..376a31f4d 100644
--- a/camlibs/kodak/dc240/library.h
+++ b/camlibs/kodak/dc240/library.h
@@ -71,7 +71,7 @@ typedef struct {
uint8_t ipChainDisable; /* 81 */ /* ????? what does that mean reserved on DC280 */
uint8_t imageIncomplete; /* 82 */
uint8_t timerMode; /* 83 */
-
+
uint16_t year; /* 88-89 BE */
uint8_t month; /* 90 */
uint8_t day; /* 91 */
@@ -79,7 +79,7 @@ typedef struct {
uint8_t minute; /* 93 */
uint8_t second; /* 94 */
uint8_t tenmSec; /* 95 */
-
+
uint8_t strobeMode; /* 97 */
uint16_t exposureComp; /* 98-99 BE see note */
uint8_t aeMode; /* 100 */
@@ -87,7 +87,7 @@ typedef struct {
uint8_t afMode; /* 102 */
uint8_t awbMode; /* 103 */
uint32_t zoomMag; /* 104-107 BE see doc */
-
+
uint8_t exposureMode; /* 129 */
uint8_t sharpControl; /* 131 */
diff --git a/camlibs/kodak/dc3200/dc3200.c b/camlibs/kodak/dc3200/dc3200.c
index 36cc1e311..24b4a22d5 100644
--- a/camlibs/kodak/dc3200/dc3200.c
+++ b/camlibs/kodak/dc3200/dc3200.c
@@ -65,14 +65,14 @@ This camera only supports one operation \
at a time. Please wait until the current \
operation has finished.")
-int camera_id (CameraText *id)
+int camera_id (CameraText *id)
{
strcpy(id->text, "kodak-dc3200");
return (GP_OK);
}
-int camera_abilities (CameraAbilitiesList *list)
+int camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -136,7 +136,7 @@ int init(Camera *camera)
/* setup the camera */
if (dc3200_setup(camera) == GP_ERROR)
- return GP_ERROR;
+ return GP_ERROR;
return GP_OK;
}
@@ -160,7 +160,7 @@ int check_last_use(Camera *camera)
time_t t;
time(&t);
-
+
if(t - camera->pl->last > 9) {
/* we have to re-init the camera */
printf(_("camera inactive for > 9 seconds, re-initing.\n"));
@@ -205,7 +205,7 @@ static int folder_list_func (CameraFilesystem *fs, const char *folder,
{
return GP_ERROR;
}
-
+
if (data == NULL)
{
return GP_ERROR;
@@ -222,14 +222,14 @@ static int folder_list_func (CameraFilesystem *fs, const char *folder,
i += 20;
continue;
}
-
+
/* skip directories starting with . */
if(ptr_data_buff[0] == '.') {
ptr_data_buff += 20;
i += 20;
continue;
}
-
+
/* copy the filename */
strncpy(filename, (char *)ptr_data_buff, sizeof(filename));
@@ -239,10 +239,10 @@ static int folder_list_func (CameraFilesystem *fs, const char *folder,
/* in case of long directory */
filename[12] = 0;
-
+
/* append dir to the list */
gp_list_append(list, filename, NULL);
-
+
ptr_data_buff += 20;
i += 20;
}
@@ -272,7 +272,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
{
return GP_ERROR;
}
-
+
/* get file list data */
res = dc3200_get_data (camera, &data, &data_len, CMD_LIST_FILES, folder,
NULL);
@@ -280,7 +280,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
{
return GP_ERROR;
}
-
+
/* check the data length */
if(data_len%20 != 0 || data_len < 1)
{
@@ -295,7 +295,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
/* add files to the list */
ptr_data_buff = data;
i = 0;
-
+
while(i < data_len) {
/* files don't have 0x10 in their attribute */
if(ptr_data_buff[11] & 0x10) {
@@ -303,7 +303,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
i += 20;
continue;
}
-
+
/* copy the first 8 bytes of filename */
strncpy(filename, (char *)ptr_data_buff, 8);
filename[8] = 0;
@@ -311,7 +311,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
strcat(filename, ".");
/* copy extension, last 3 bytes*/
strncat(filename, (char *)ptr_data_buff+8, 3);
-
+
if(!strstr(filename, ".JPG") && !strstr(filename, ".jpg")) {
ptr_data_buff += 20;
i += 20;
@@ -320,7 +320,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
/* append file to the list */
gp_list_append(list, filename, NULL);
-
+
ptr_data_buff += 20;
i += 20;
}
@@ -331,7 +331,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
- CameraFile *file, void *user_data,
+ CameraFile *file, void *user_data,
GPContext *context)
{
Camera *camera = user_data;
@@ -359,7 +359,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
CMD_GET_PREVIEW, folder, filename);
break;
case GP_FILE_TYPE_NORMAL:
- res = dc3200_get_data (camera, &data, &data_len,
+ res = dc3200_get_data (camera, &data, &data_len,
CMD_GET_FILE, folder, filename);
break;
default:
@@ -411,11 +411,11 @@ get_info_func (CameraFilesystem *fs, const char *folder,
{
return GP_ERROR;
}
-
+
strcpy(file, folder);
if(folder[strlen(folder)-1] != '\\' || folder[strlen(folder)-1] != '/')
strcat(file, "\\");
- strcat(file, filename);
+ strcat(file, filename);
/* get file list data */
res = dc3200_get_data (camera, &data, &data_len, CMD_LIST_FILES, file,
@@ -441,7 +441,7 @@ get_info_func (CameraFilesystem *fs, const char *folder,
info->file.fields = GP_FILE_INFO_SIZE | GP_FILE_INFO_TYPE;
info->file.size = bytes_to_l(data[19], data[18], data[17], data[16]);
strcpy (info->file.type, GP_MIME_JPEG);
-
+
info->preview.fields = GP_FILE_INFO_TYPE;
strcpy (info->preview.type, GP_MIME_JPEG);
@@ -451,7 +451,7 @@ get_info_func (CameraFilesystem *fs, const char *folder,
static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
{
- strcpy (manual->text,
+ strcpy (manual->text,
_("Known problems:\n"
"\n"
"1. If the Kodak DC3200 does not receive a command at least "
@@ -464,7 +464,7 @@ static int camera_manual (Camera *camera, CameraText *manual, GPContext *context
static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
- strcpy (about->text,
+ strcpy (about->text,
_("Kodak DC3200 Driver\n"
"Donn Morrison <dmorriso@gulf.uvic.ca>\n"
"\n"
@@ -479,7 +479,7 @@ static CameraFilesystemFuncs fsfuncs = {
.folder_list_func = folder_list_func
};
-int camera_init (Camera *camera, GPContext *context)
+int camera_init (Camera *camera, GPContext *context)
{
int ret;
diff --git a/camlibs/konica/konica.c b/camlibs/konica/konica.c
index ab73762cc..fba7092c4 100644
--- a/camlibs/konica/konica.c
+++ b/camlibs/konica/konica.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -138,7 +138,7 @@ k_check (GPContext *c, const unsigned char *rb)
"error that has not yet been discovered. Please "
"report the following to %s "
"with additional information how you got this error: "
- "(0x%x,0x%x). Thank you very much!"),
+ "(0x%x,0x%x). Thank you very much!"),
MAIL_GPHOTO_DEVEL, rb[2], rb[3]);
return (GP_ERROR);
}
@@ -775,7 +775,7 @@ k_get_status (GPPort *p, GPContext *c, KStatus *status)
CHECK_NULL (status);
CRF (c, l_send_receive (p, c, sb, 6, &rb, &rbs, 0, NULL, NULL), rb);
-
+
status->self_test_result = (rb[5] << 8) | rb[4];
status->power_level = rb[6];
status->power_source = rb[7];
@@ -1285,7 +1285,7 @@ k_localization_data_put (GPPort *p, GPContext *c,
* packets but make sure we don't loop
* forever.
*/
- if (i > 131072)
+ if (i > 131072)
return (GP_ERROR);
}
}
diff --git a/camlibs/konica/konica.h b/camlibs/konica/konica.h
index 8a9c31106..87ce44275 100644
--- a/camlibs/konica/konica.h
+++ b/camlibs/konica/konica.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -25,7 +25,7 @@
#include <gphoto2/gphoto2-context.h>
/*
- * The following are the commands that are supported by the
+ * The following are the commands that are supported by the
* camera. All other commands will be rejected as unsupported.
*
* 0x9200: On 'HP PhotoSmart C20', this command seems to
@@ -59,7 +59,7 @@ typedef enum
K_SET_PREFERENCE = 0x90c0,
K_RESET_PREFERENCES = 0x90c1,
K_TAKE_PICTURE = 0x9100,
- K_PUT_LOCALIZATION_FILE = 0x9200,
+ K_PUT_LOCALIZATION_FILE = 0x9200,
K_CANCEL = 0x9e00
/* ? = 0x9e10, */
/* ? = 0x9e20, */
@@ -183,7 +183,7 @@ typedef enum
typedef enum
{
- K_POWER_LEVEL_LOW = 0x00,
+ K_POWER_LEVEL_LOW = 0x00,
K_POWER_LEVEL_NORMAL = 0x01,
K_POWER_LEVEL_HIGH = 0x02
} KPowerLevel;
@@ -271,9 +271,9 @@ int k_format_memory_card (GPPort *, GPContext *);
int k_take_picture (
GPPort *device, GPContext *,
int image_id_long,
- unsigned long *image_id,
+ unsigned long *image_id,
unsigned int *exif_size,
- unsigned char **information_buffer,
+ unsigned char **information_buffer,
unsigned int *information_buffer_size,
int *protected);
@@ -352,18 +352,18 @@ int k_get_image_information (
GPPort *device, GPContext *,
int image_id_long,
unsigned long image_number,
- unsigned long *image_id,
- unsigned int *exif_size,
- int *protected,
+ unsigned long *image_id,
+ unsigned int *exif_size,
+ int *protected,
unsigned char **information_buffer,
unsigned int *information_buffer_size);
int k_get_image (
GPPort *device, GPContext *,
int image_id_long,
- unsigned long image_id,
- KImageType image_type,
- unsigned char **image_buffer,
+ unsigned long image_id,
+ KImageType image_type,
+ unsigned char **image_buffer,
unsigned int *image_buffer_size);
/* Localization */
diff --git a/camlibs/konica/lowlevel.c b/camlibs/konica/lowlevel.c
index 0d9231508..2510f4855 100644
--- a/camlibs/konica/lowlevel.c
+++ b/camlibs/konica/lowlevel.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -38,7 +38,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -96,7 +96,7 @@ l_ping_rec (GPPort *p, unsigned int level)
else
return (GP_ERROR_CORRUPTED_DATA);
case ENQ:
-
+
/*
* ENQ received. It seems that the camera would like
* to send us data, but we do not want it and
@@ -152,7 +152,7 @@ l_ping (GPPort *p, GPContext *c)
return (l_ping_rec (p, 0));
}
-int
+int
l_init (GPPort *p, GPContext *c)
{
unsigned int i;
@@ -168,7 +168,7 @@ l_init (GPPort *p, GPContext *c)
return (result);
}
-static int
+static int
l_esc_read (GPPort *p, unsigned char *c)
{
CHECK_NULL (p && c);
@@ -223,7 +223,7 @@ l_send (GPPort *p, GPContext *context, unsigned char *send_buffer,
/* sb: A pointer to the buffer that we will send. */
/* sbs: Its size. */
/**********************************************************************/
- unsigned char *sb;
+ unsigned char *sb;
unsigned int sbs;
int i = 0;
@@ -253,10 +253,10 @@ l_send (GPPort *p, GPContext *context, unsigned char *send_buffer,
checksum += sb[2];
for (i = 3; i < (sbs - 2); i++) {
checksum += *send_buffer;
- if ( (*send_buffer == STX ) ||
+ if ( (*send_buffer == STX ) ||
(*send_buffer == ETX ) ||
(*send_buffer == ENQ ) ||
- (*send_buffer == ACK ) ||
+ (*send_buffer == ACK ) ||
(*send_buffer == XOFF) ||
(*send_buffer == XON ) ||
(*send_buffer == NACK) ||
@@ -270,13 +270,13 @@ l_send (GPPort *p, GPContext *context, unsigned char *send_buffer,
}
sb[sbs - 2] = ETX;
checksum += ETX;
- if ( (checksum == STX ) ||
- (checksum == ETX ) ||
- (checksum == ENQ ) ||
- (checksum == ACK ) ||
+ if ( (checksum == STX ) ||
+ (checksum == ETX ) ||
+ (checksum == ENQ ) ||
+ (checksum == ACK ) ||
(checksum == XOFF) ||
- (checksum == XON ) ||
- (checksum == NACK) ||
+ (checksum == XON ) ||
+ (checksum == NACK) ||
(checksum == ETB ) ||
(checksum == ESC )) {
sb = realloc (sb, ++sbs * sizeof (char));
@@ -315,7 +315,7 @@ l_send (GPPort *p, GPContext *context, unsigned char *send_buffer,
}
-static int
+static int
l_receive (GPPort *p, GPContext *context,
unsigned char **rb, unsigned int *rbs,
unsigned int timeout)
@@ -426,7 +426,7 @@ while (read < rbs_internal) {
* Read the specified amount of bytes. We will probably read more
* because some bytes will be quoted.
*/
- GP_DEBUG ("Reading %i bytes (%i of %i already read)...",
+ GP_DEBUG ("Reading %i bytes (%i of %i already read)...",
rbs_internal - read, read, rbs_internal);
result = gp_port_read (p, (char *)&((*rb)[*rbs + read]),
rbs_internal - read);
@@ -560,7 +560,7 @@ while (read < rbs_internal) {
/*
* Depending on d, we will either continue to receive data or
* stop.
- *
+ *
* - ETX: We are all done.
* - ETB: We expect more data.
* - else: Should not happen.
@@ -612,10 +612,10 @@ while (read < rbs_internal) {
}
}
-int
+int
l_send_receive (
GPPort *p, GPContext *c,
- unsigned char *send_buffer, unsigned int send_buffer_size,
+ unsigned char *send_buffer, unsigned int send_buffer_size,
unsigned char **receive_buffer, unsigned int *receive_buffer_size,
unsigned int timeout,
unsigned char **image_buffer, unsigned int *image_buffer_size)
@@ -639,10 +639,10 @@ l_send_receive (
return (GP_OK);
/* We didn't receive control data yet. */
- *image_buffer = *receive_buffer;
+ *image_buffer = *receive_buffer;
*image_buffer_size = *receive_buffer_size;
*receive_buffer = NULL;
-
+
/* Receive control data. */
CHECK (l_receive (p, c, receive_buffer, receive_buffer_size,
DEFAULT_TIMEOUT));
@@ -651,6 +651,6 @@ l_send_receive (
if (((*receive_buffer)[0] != send_buffer[0]) ||
((*receive_buffer)[1] != send_buffer[1]))
return (GP_ERROR_CORRUPTED_DATA);
-
+
return (GP_OK);
}
diff --git a/camlibs/konica/lowlevel.h b/camlibs/konica/lowlevel.h
index f9961a7de..a0545e768 100644
--- a/camlibs/konica/lowlevel.h
+++ b/camlibs/konica/lowlevel.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -30,7 +30,7 @@ int l_init (GPPort *, GPContext *);
/*
* Some comments on the structure of send_buffer, image_buffer,
* and receive_buffer:
- *
+ *
* send_buffer: The first two bytes are low order and high
* byte of the command, followed by at least two
* more bytes. The number of sent bytes has to be
diff --git a/camlibs/konica/qm150.c b/camlibs/konica/qm150.c
index 14f5d7eff..d37f22b67 100644
--- a/camlibs/konica/qm150.c
+++ b/camlibs/konica/qm150.c
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -19,7 +19,7 @@
* Boston, MA 02110-1301 USA
*
* Modified by Aurélien Croc (AP²C) <programming@ap2c.com>
- * In particular : fix some bugs, and implementation of advanced
+ * In particular : fix some bugs, and implementation of advanced
* functions : delete some images, delete all images, capture new image,
* update an image to the camera, get thumbnails, get information, get
* summary, get configuration, get manual, get about, get EXIF informations
@@ -27,7 +27,7 @@
*/
/* NOTES :
- * Becareful, image information number starts at 1 and finish at the
+ * Becareful, image information number starts at 1 and finish at the
* max image number. But when you want to work on the images, you must
* read image informations, and check the real image number in the image
* information header and use this number with all functions !!
@@ -136,7 +136,7 @@
/** Local functions **********************************************************/
-/*
+/*
* Check the integrity of datas
*/
static unsigned char
@@ -149,17 +149,17 @@ k_calculate_checksum (unsigned char *buf, unsigned long int len)
return result;
}
-/*
+/*
* Check the connection and the camera
*/
static int
k_ping (GPPort *port) {
char cmd[2], buf[1];
int ret;
-
+
cmd[0] = ESC;
cmd[1] = PING;
- ret = gp_port_write (port, cmd, 2);
+ ret = gp_port_write (port, cmd, 2);
if (ret<GP_OK) return ret;
ret = gp_port_read (port, buf, 1);
if (ret<GP_OK) return ret;
@@ -167,11 +167,11 @@ k_ping (GPPort *port) {
return GP_OK;
}
-/*
- * Read image informations
+/*
+ * Read image informations
*/
static int
-k_info_img (unsigned int image_no, void *data, CameraFileInfo* info,
+k_info_img (unsigned int image_no, void *data, CameraFileInfo* info,
int *data_number)
{
unsigned char cmd[6], buf[INFO_BUFFER];
@@ -185,7 +185,7 @@ k_info_img (unsigned int image_no, void *data, CameraFileInfo* info,
cmd[3] = 0x30 + ((image_no/100 )%10);
cmd[4] = 0x30 + ((image_no/10 )%10);
cmd[5] = 0x30 + ( image_no %10);
- ret = gp_port_write (camera->port, (char*)cmd, sizeof(cmd));
+ ret = gp_port_write (camera->port, (char*)cmd, sizeof(cmd));
if (ret<GP_OK) return ret;
ret = gp_port_read (camera->port, (char*)buf, INFO_BUFFER);
if (ret<GP_OK) return ret;
@@ -199,10 +199,10 @@ k_info_img (unsigned int image_no, void *data, CameraFileInfo* info,
/* There is no audio support with this camera */
info->audio.fields = GP_FILE_INFO_NONE;
/* Preview informations */
- info->preview.fields = GP_FILE_INFO_TYPE | GP_FILE_INFO_SIZE
+ info->preview.fields = GP_FILE_INFO_TYPE | GP_FILE_INFO_SIZE
| GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT;
strcpy (info->preview.type, GP_MIME_JPEG);
- info->preview.size = ((buf[PREVIEW_SIZE_PTR] << 24) |
+ info->preview.size = ((buf[PREVIEW_SIZE_PTR] << 24) |
(buf[PREVIEW_SIZE_PTR+1] << 16) | (buf[PREVIEW_SIZE_PTR+2] << 8)
| buf[PREVIEW_SIZE_PTR+3]);
info->preview.width = PREVIEW_WIDTH;
@@ -230,7 +230,7 @@ k_info_img (unsigned int image_no, void *data, CameraFileInfo* info,
* type = GP_FILE_TYPE_NORMAL, GP_FILE_TYPE_PREVIEW or GP_FILE_TYPE_EXIF
*/
static int
-k_getdata (int image_no, int type, unsigned int len, void *data,
+k_getdata (int image_no, int type, unsigned int len, void *data,
unsigned char *d, GPContext *context)
{
Camera *camera = data;
@@ -259,7 +259,7 @@ k_getdata (int image_no, int type, unsigned int len, void *data,
/* Download the required image */
if (type == GP_FILE_TYPE_NORMAL)
- id = gp_context_progress_start (context, len,
+ id = gp_context_progress_start (context, len,
_("Downloading image..."));
for (i=0; i <= (len+DATA_BUFFER-1)/DATA_BUFFER ; i++) {
unsigned char csum;
@@ -269,7 +269,7 @@ k_getdata (int image_no, int type, unsigned int len, void *data,
if (xret < GP_OK) {
if (type == GP_FILE_TYPE_NORMAL)
gp_context_progress_stop (context, id);
- return xret;
+ return xret;
}
ret = gp_port_read (camera->port, (char*)&csum, CSUM_LEN);
if (ret < GP_OK) {
@@ -297,7 +297,7 @@ k_getdata (int image_no, int type, unsigned int len, void *data,
}
/* acknowledge the packet */
- ack = ACK;
+ ack = ACK;
ret = gp_port_write (camera->port, (char*)&ack, ACK_LEN);
if (ret < GP_OK) {
if (type == GP_FILE_TYPE_NORMAL)
@@ -317,7 +317,7 @@ k_getdata (int image_no, int type, unsigned int len, void *data,
gp_context_progress_update (context, id, bytes_read);
}
/* acknowledge the packet */
- ack = ACK;
+ ack = ACK;
ret = gp_port_write (camera->port, (char*)&ack, ACK_LEN);
if (ret < GP_OK) {
if (type == GP_FILE_TYPE_NORMAL)
@@ -354,7 +354,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* Search the image informations */
image_no++;
- ret = k_info_img (image_no, data, (CameraFileInfo *)&file_info,
+ ret = k_info_img (image_no, data, (CameraFileInfo *)&file_info,
&image_number);
image_no = image_number;
if (ret < GP_OK)
@@ -369,14 +369,14 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
data, d, context);
if (ret < GP_OK) {
free(d);
- return ret;
+ return ret;
}
break;
case GP_FILE_TYPE_PREVIEW:
len = file_info.preview.size;
if (!(d = (unsigned char *)malloc(len)))
return (GP_ERROR_NO_MEMORY);
- ret = k_getdata(image_no, GP_FILE_TYPE_PREVIEW, len,
+ ret = k_getdata(image_no, GP_FILE_TYPE_PREVIEW, len,
data, d, context);
if (ret < GP_OK) {
free(d);
@@ -403,7 +403,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
len = file_info.preview.size;
if (!(d = (unsigned char *)malloc(len)))
return (GP_ERROR_NO_MEMORY);
- ret = k_getdata(image_no, GP_FILE_TYPE_EXIF, len,
+ ret = k_getdata(image_no, GP_FILE_TYPE_EXIF, len,
data, d, context);
if (ret < GP_OK) {
free(d);
@@ -411,7 +411,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
break;
default:
- gp_context_error(context,
+ gp_context_error(context,
_("Image type %d is not supported by this camera !"), type);
return (GP_ERROR_NOT_SUPPORTED);
}
@@ -426,7 +426,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
* The image mustn't be protected
*/
static int
-delete_file_func (CameraFilesystem *fs, const char *folder,
+delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data, GPContext *context)
{
Camera *camera = data;
@@ -441,7 +441,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
if (image_no < 0) return image_no;
image_no++;
- ret = k_info_img (image_no, data, (CameraFileInfo *)&file_info,
+ ret = k_info_img (image_no, data, (CameraFileInfo *)&file_info,
&image_no);
if (ret < GP_OK)
return ret;
@@ -468,7 +468,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
if (ack != ACK) {
gp_context_error(context, _("Can't delete image %s."),filename);
return (GP_ERROR);
- }
+ }
return (GP_OK);
}
@@ -499,7 +499,7 @@ delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
if (ack != ACK) {
gp_context_error(context, _("Can't delete all images."));
return (GP_ERROR);
- }
+ }
return (GP_OK);
}
@@ -511,7 +511,7 @@ delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
*/
static int
put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
- CameraFileType type, CameraFile *file,
+ CameraFileType type, CameraFile *file,
void *data, GPContext *context)
{
Camera *camera = data;
@@ -520,14 +520,14 @@ put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
unsigned long int len, len_sent=0;
unsigned int id;
int ret,i;
-
+
GP_DEBUG ("*** ENTER: put_file_func ***");
/* Send function */
cmd[0] = ESC;
cmd[1] = UPLOADDATA;
- ret = gp_port_write (camera->port, (char*)cmd, sizeof(cmd));
- if (ret<GP_OK)
+ ret = gp_port_write (camera->port, (char*)cmd, sizeof(cmd));
+ if (ret<GP_OK)
return ret;
gp_file_get_data_and_size(file, &d, &len);
id = gp_context_progress_start (context, len, _("Uploading image..."));
@@ -539,13 +539,13 @@ put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
}
if (ack != ACK) {
gp_context_progress_stop (context, id);
- gp_context_error(context,
+ gp_context_error(context,
_("Can't upload this image to the camera. "
"An error has occurred."));
return (GP_ERROR);
}
state = NEXTFRAME;
- ret = gp_port_write (camera->port, (char*)&state, STATE_LEN);
+ ret = gp_port_write (camera->port, (char*)&state, STATE_LEN);
if (ret<GP_OK) {
gp_context_progress_stop (context, id);
return ret;
@@ -560,7 +560,7 @@ put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
}
/* and complete with zeros */
memset(buf,0,DATA_BUFFER);
- ret = gp_port_write (camera->port, (char*)buf, (DATA_BUFFER -
+ ret = gp_port_write (camera->port, (char*)buf, (DATA_BUFFER -
(len - len_sent)));
if (ret<GP_OK) {
gp_context_progress_stop (context, id);
@@ -585,7 +585,7 @@ put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
(unsigned char *)&d[i*DATA_BUFFER],
DATA_BUFFER);
}
- ret = gp_port_write (camera->port, (char*)&sum, CSUM_LEN);
+ ret = gp_port_write (camera->port, (char*)&sum, CSUM_LEN);
if (ret<GP_OK) {
gp_context_progress_stop (context, id);
return ret;
@@ -593,7 +593,7 @@ put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
gp_context_progress_update (context, id, len_sent);
}
state = EOT;
- ret = gp_port_write (camera->port, (char*)&state, STATE_LEN);
+ ret = gp_port_write (camera->port, (char*)&state, STATE_LEN);
if (ret<GP_OK) {
gp_context_progress_stop (context, id);
return ret;
@@ -628,7 +628,7 @@ camera_capture (Camera* camera, CameraCaptureType type, CameraFilePath* path,
/* Just check if there is space available yet */
cmd[0] = ESC;
cmd[1] = GETCAMINFO;
- ret = gp_port_write (camera->port, (char*)cmd, 2);
+ ret = gp_port_write (camera->port, (char*)cmd, 2);
if (ret<GP_OK)
return ret;
ret = gp_port_read (camera->port, (char*)buf, INFO_BUFFER);
@@ -755,7 +755,7 @@ camera_get_config (Camera* camera, CameraWidget** window, GPContext *context)
timestamp = (buf[TIMESTAMP_PTR] << 24) + (buf[TIMESTAMP_PTR+1] << 16)
+ (buf[TIMESTAMP_PTR+2] << 8) + buf[TIMESTAMP_PTR+3];
/*
- * This timestamp start the 1 January 1980 at 00:00
+ * This timestamp start the 1 January 1980 at 00:00
* but UNIX timestamp start the 1 January 1970 at 00:00
* so we calculate the UNIX timestamp with the camera's one
*/
@@ -874,14 +874,14 @@ camera_get_config (Camera* camera, CameraWidget** window, GPContext *context)
break;
case 1:
if (buf[RED_EYE_STATE_PTR] == 1)
- gp_widget_set_value (widget,
+ gp_widget_set_value (widget,
_("On, red-eye reduction"));
else
gp_widget_set_value (widget, _("On"));
break;
case 0:
if (buf[RED_EYE_STATE_PTR] == 1)
- gp_widget_set_value (widget,
+ gp_widget_set_value (widget,
_("Auto, red-eye reduction"));
else
gp_widget_set_value (widget, _("Auto"));
@@ -1177,7 +1177,7 @@ camera_summary (Camera *camera, CameraText *text, GPContext *context)
snprintf(date_disp,sizeof(date_disp),_("MM/DD/YYYY"));
break;
}
- snprintf(text->text, sizeof(text->text),
+ snprintf(text->text, sizeof(text->text),
_("Model: %s\n"
"Capacity: %i Mb\n"
"Power: %s\n"
@@ -1230,7 +1230,7 @@ camera_manual (Camera *camera, CameraText *manual, GPContext *context)
* Camera's identification
*/
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "konica qm150");
return (GP_OK);
@@ -1240,7 +1240,7 @@ camera_id (CameraText *id)
* List all camera's abilities
*/
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -1250,11 +1250,11 @@ camera_abilities (CameraAbilitiesList *list)
a.port = GP_PORT_SERIAL;
a.speed[0] = 115200;
a.speed[1] = 0;
- a.operations = GP_OPERATION_CAPTURE_IMAGE |
+ a.operations = GP_OPERATION_CAPTURE_IMAGE |
GP_OPERATION_CAPTURE_PREVIEW | GP_OPERATION_CONFIG;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_EXIF | GP_FILE_OPERATION_PREVIEW;
- a.folder_operations = GP_FOLDER_OPERATION_DELETE_ALL |
+ a.folder_operations = GP_FOLDER_OPERATION_DELETE_ALL |
GP_FOLDER_OPERATION_PUT_FILE;
gp_abilities_list_append(list, a);
return (GP_OK);
@@ -1274,7 +1274,7 @@ static CameraFilesystemFuncs fsfuncs = {
.delete_all_func = delete_all_func,
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
GPPortSettings settings;
int speeds[] = { 115200, 9600, 19200, 38400, 57600, 115200 };
@@ -1305,7 +1305,7 @@ camera_init (Camera *camera, GPContext *context)
settings.serial.parity = 0;
gp_port_set_settings (camera->port, settings);
/*
- * Once you have configured the port, you should check if a
+ * Once you have configured the port, you should check if a
* connection to the camera can be established.
*/
for (i=0;i<sizeof(speeds)/sizeof(speeds[0]);i++) {
@@ -1320,7 +1320,7 @@ camera_init (Camera *camera, GPContext *context)
cmd[0] = ESC;
cmd[1] = SETSPEED;
cmd[2] = 0x30 + 4; /* speed nr 4:(9600, 19200, 38400, 57600, 115200) */
- ret = gp_port_write (camera->port, cmd, 3);
+ ret = gp_port_write (camera->port, cmd, 3);
if (ret<GP_OK) return ret;
ret = gp_port_read (camera->port, buf, 1);
if (ret<GP_OK) return ret;
diff --git a/camlibs/largan/lmini/largan.c b/camlibs/largan/lmini/largan.c
index c1ccc29fc..2f3e87f5f 100644
--- a/camlibs/largan/lmini/largan.c
+++ b/camlibs/largan/lmini/largan.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -58,7 +58,7 @@
static uint8_t convert_name_to_index (const char * name);
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "largan-lmini");
@@ -83,7 +83,7 @@ static const struct largan_cameras {
};
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
int i;
@@ -107,10 +107,10 @@ camera_abilities (CameraAbilitiesList *list)
}
a.operations = GP_OPERATION_CAPTURE_IMAGE;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
-
+
if (a.port) {
/* only append if port is defined.*/
gp_abilities_list_append(list, a);
@@ -120,7 +120,7 @@ camera_abilities (CameraAbilitiesList *list)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
return (GP_OK);
}
@@ -142,7 +142,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
largan_pict_type pict_type;
index = convert_name_to_index (filename);
-
+
switch (type) {
case GP_FILE_TYPE_NORMAL:
pict_type = LARGAN_PICT;
@@ -153,7 +153,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
default:
return GP_ERROR_NOT_SUPPORTED;
}
-
+
pict = largan_pict_new ();
ret = largan_get_pict (camera, pict_type, (uint8_t)index, pict);
if (ret == GP_OK) {
@@ -171,7 +171,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
-static uint8_t
+static uint8_t
convert_name_to_index (const char * name)
{
long index;
@@ -192,10 +192,10 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
{
Camera *camera = data;
int index;
-
- /* Delete one file from the camera.
+
+ /* Delete one file from the camera.
(only the last file can be deleted)*/
-
+
index = convert_name_to_index (filename);
return largan_erase (camera, index);
}
@@ -262,7 +262,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
int ret;
GPPortSettings settings;
@@ -307,13 +307,13 @@ camera_init (Camera *camera, GPContext *context)
default:
return (GP_ERROR_UNKNOWN_PORT);
}
-
+
ret = gp_port_set_settings (camera->port, settings);
if (ret < 0)
return (ret);
/*
- * Once you have configured the port, you should check if a
+ * Once you have configured the port, you should check if a
* connection to the camera can be established.
*/
return largan_open (camera);
diff --git a/camlibs/largan/lmini/lmini.c b/camlibs/largan/lmini/lmini.c
index b1d5cf587..5ec1c9b5a 100644
--- a/camlibs/largan/lmini/lmini.c
+++ b/camlibs/largan/lmini/lmini.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -50,7 +50,7 @@ static const char BMPheader[54]={
static struct largan_baud_rate {
int baud;
char value; /* value to be sent in the protocol */
-} bauds [] = {
+} bauds [] = {
{19200, 0x02 }, /* default */
{38400, 0x03 },
{ 9600, 0x01 },
@@ -69,9 +69,9 @@ enum {
static int purge_camera (Camera * camera);
static int wakeup_camera (Camera * camera);
-static int largan_send_command (Camera * camera, uint8_t cmd,
+static int largan_send_command (Camera * camera, uint8_t cmd,
uint8_t param1, uint8_t param2);
-static int largan_recv_reply (Camera * camera, uint8_t *reply,
+static int largan_recv_reply (Camera * camera, uint8_t *reply,
uint8_t *code, uint8_t * code2);
static int set_serial_speed (Camera * camera, int speed);
@@ -108,7 +108,7 @@ largan_pict_alloc_data (largan_pict_info * ptr, uint32_t size)
int largan_open (Camera * camera)
{
int ret;
-
+
ret = largan_get_num_pict (camera);
if (ret < 0){
ret = purge_camera (camera);
@@ -175,7 +175,7 @@ int largan_get_pict (Camera * camera, largan_pict_type type,
return ret;
}
ret = largan_recv_reply (camera, &reply, &code, NULL);
-/* here we have to receive 7 bytes back
+/* here we have to receive 7 bytes back
the 2nd contains 00 for thumbnail or 01 for original picture
the 3rd contains the picturenumber for an original picture
or 00 for an thumbnail for an lowres picture
@@ -205,7 +205,7 @@ int largan_get_pict (Camera * camera, largan_pict_type type,
GP_DEBUG ("largan_get_pict(): code != 0x01 && 0x00\n");
return GP_ERROR;
}
-
+
/* the remaining 5 bytes are read here */
ret = gp_port_read (camera->port, (char *)buf, sizeof(buf));
@@ -231,7 +231,7 @@ int largan_get_pict (Camera * camera, largan_pict_type type,
pict->type = type;
pict_size = be32atoh (&buf[1]);
switch (type) {
- case LARGAN_PICT:
+ case LARGAN_PICT:
largan_pict_alloc_data (pict, pict_size);
ret = gp_port_read (camera->port, pict->data, pict->data_size);
if (ret < GP_OK) {
@@ -243,7 +243,7 @@ int largan_get_pict (Camera * camera, largan_pict_type type,
}
pict->quality = 0xff; /* this is not a thumbnail */
break;
- case LARGAN_THUMBNAIL:
+ case LARGAN_THUMBNAIL:
{
char * buffer = (char*)malloc(pict_size);
@@ -258,7 +258,7 @@ int largan_get_pict (Camera * camera, largan_pict_type type,
memcpy (pict->data, BMPheader, sizeof(BMPheader));
/*this is the segfaulty function */
largan_ccd2dib (buffer, pict->data + sizeof(BMPheader), 240, 1);
-
+
free (buffer);
pict->quality = buf[0];
break;
@@ -416,7 +416,7 @@ static int largan_recv_reply (Camera * camera, uint8_t *reply,
packet_size = 2;
break;
case LARGAN_GET_PICT_CMD:
- packet_size = 2;
+ packet_size = 2;
break;
case LARGAN_BAUD_ERASE_CMD:
packet_size = 2;
@@ -507,18 +507,18 @@ static int set_serial_speed (Camera * camera, int speed)
int ret;
GPPortSettings settings;
GP_DEBUG ("set_serial_speed() called ***************\n");
-
+
if (camera->port->type != GP_PORT_SERIAL) {
GP_DEBUG ("set_serial_speed() called on non serial port\n");
return GP_ERROR;
}
-
+
ret = gp_port_get_settings (camera->port, &settings);
if (ret < 0) {
return ret;
}
settings.serial.speed = speed;
-
+
ret = gp_port_set_settings (camera->port, settings);
return ret;
}
@@ -537,7 +537,7 @@ static int purge_camera (Camera * camera)
while (1)
{
count = gp_port_read (camera->port, (char *)buffer, 1);
- if (count < GP_OK)
+ if (count < GP_OK)
return count;
if (count)
@@ -567,7 +567,7 @@ static int wakeup_camera (Camera * camera)
{
int num_pix;
/* int i;*/
-
+
if (camera->port->type == GP_PORT_SERIAL) {
set_serial_speed (camera, 4800); /*wakes camera best*/
num_pix = largan_get_num_pict (camera); /*this wakes*/
diff --git a/camlibs/largan/lmini/lmini.h b/camlibs/largan/lmini/lmini.h
index d37fae4f1..d7555ea2a 100644
--- a/camlibs/largan/lmini/lmini.h
+++ b/camlibs/largan/lmini/lmini.h
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -49,7 +49,7 @@ void largan_pict_free (largan_pict_info *);
int largan_open (Camera * camera);
int largan_get_num_pict (Camera * camera);
-int largan_get_pict (Camera * camera, largan_pict_type type,
+int largan_get_pict (Camera * camera, largan_pict_type type,
uint8_t index, largan_pict_info * pict);
int largan_erase (Camera *camera, int all);
int largan_capture (Camera *camera);
diff --git a/camlibs/lg_gsm/lg_gsm.c b/camlibs/lg_gsm/lg_gsm.c
index b6266fbe2..ce926d5cc 100644
--- a/camlibs/lg_gsm/lg_gsm.c
+++ b/camlibs/lg_gsm/lg_gsm.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -30,7 +30,7 @@
#include "lg_gsm.h"
-#define GP_MODULE "lg_gsm"
+#define GP_MODULE "lg_gsm"
#define MSGWRITE gp_port_usb_msg_write
#define WRITE gp_port_write
@@ -42,7 +42,7 @@ static char get_firmware[] = "\x1\x0\x0\x0\x0\x0";
static char list_all_photo[]= "\x04\x0\x08\x0\x0\x0\x40\x0\x0\x0\xff\xff\xff\xff";
static char get_photo_cmd[]="\x0b\x0\x8a\x0\x0\x0\x40\x0\x0\x0";
-int lg_gsm_init (GPPort *port, Model *model, Info *info)
+int lg_gsm_init (GPPort *port, Model *model, Info *info)
{
char firmware[54];
char oknok[6];
@@ -75,7 +75,7 @@ int lg_gsm_init (GPPort *port, Model *model, Info *info)
return GP_OK;
}
-unsigned int lg_gsm_get_picture_size (GPPort *port, int pic)
+unsigned int lg_gsm_get_picture_size (GPPort *port, int pic)
{
unsigned int size;
@@ -108,7 +108,7 @@ unsigned int lg_gsm_get_picture_size (GPPort *port, int pic)
size = (unsigned int)photodesc[138] + (unsigned int)photodesc[139]*0x100 + (unsigned int)photodesc[140]*0x10000+(unsigned int)photodesc[141]*0x1000000;
GP_DEBUG(" size of picture %i is 0x%x\n", pic, size);
/* max. 1280x960x24bits ? */
- if ( (size >= 0x384000 ) ) {return GP_ERROR;}
+ if ( (size >= 0x384000 ) ) {return GP_ERROR;}
MSGWRITE(port, 0x13, 0x6, 0x0, "", 0);
WRITE(port, sync_stop, 6);
READ(port, oknok, 6);
@@ -116,7 +116,7 @@ unsigned int lg_gsm_get_picture_size (GPPort *port, int pic)
return size;
}
-int lg_gsm_read_picture_data (GPPort *port, char *data, unsigned int datasize, unsigned int n)
+int lg_gsm_read_picture_data (GPPort *port, char *data, unsigned int datasize, unsigned int n)
{
char listphotos[] = "\x04\x0\x08\x0\x0\x0\x40\x0\x0\x0\x0\x0\x0\x0";
@@ -197,7 +197,7 @@ int lg_gsm_read_picture_data (GPPort *port, char *data, unsigned int datasize, u
memcpy(data+pos,&block[header_size],remain);
pos=pos+remain;
}
-
+
}
/*port->timeout=5000;*/
/* syncstop */
@@ -209,10 +209,10 @@ int lg_gsm_read_picture_data (GPPort *port, char *data, unsigned int datasize, u
return GP_OK;
}
-int lg_gsm_list_files (GPPort *port, CameraList *list)
+int lg_gsm_list_files (GPPort *port, CameraList *list)
{
unsigned int num_pics;
- int i;
+ int i;
char oknok[6];
unsigned char photonumber[22];
diff --git a/camlibs/lg_gsm/lg_gsm.h b/camlibs/lg_gsm/lg_gsm.h
index bcbb2372a..182659d68 100644
--- a/camlibs/lg_gsm/lg_gsm.h
+++ b/camlibs/lg_gsm/lg_gsm.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/lg_gsm/library.c b/camlibs/lg_gsm/library.c
index 6ecb26ccf..1244b0ce2 100644
--- a/camlibs/lg_gsm/library.c
+++ b/camlibs/lg_gsm/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -135,7 +135,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *user_data,
GPContext *context)
{
- Camera *camera = user_data;
+ Camera *camera = user_data;
int k;
char *data;
@@ -196,11 +196,11 @@ camera_init(Camera *camera, GPContext *context)
camera->functions->summary = camera_summary;
camera->functions->about = camera_about;
camera->functions->exit = camera_exit;
-
+
GP_DEBUG ("Initializing the camera\n");
ret = gp_port_get_settings(camera->port,&settings);
- if (ret < 0)
- return ret;
+ if (ret < 0)
+ return ret;
switch (camera->port->type) {
case GP_PORT_SERIAL:
@@ -217,18 +217,18 @@ camera_init(Camera *camera, GPContext *context)
}
ret = gp_port_set_settings(camera->port,settings);
- if (ret < 0)
- return ret;
+ if (ret < 0)
+ return ret;
GP_DEBUG("interface = %i\n", settings.usb.interface);
- GP_DEBUG("inep = %x\n", settings.usb.inep);
+ GP_DEBUG("inep = %x\n", settings.usb.inep);
GP_DEBUG("outep = %x\n", settings.usb.outep);
/* Tell the CameraFilesystem where to get lists from */
gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera);
camera->pl = malloc (sizeof (CameraPrivateLibrary));
- if (!camera->pl)
+ if (!camera->pl)
return GP_ERROR_NO_MEMORY;
memset (camera->pl, 0, sizeof (CameraPrivateLibrary));
diff --git a/camlibs/lumix/lumix.c b/camlibs/lumix/lumix.c
index 4e27745df..d2f11fae3 100644
--- a/camlibs/lumix/lumix.c
+++ b/camlibs/lumix/lumix.c
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -87,7 +87,7 @@
char* CDS_Control = ":60606/Server0/CDS_control";
int ReadoutMode = 2; // this should be picked up from the settings.... 0-> JPG; 1->RAW; 2 -> Thumbnails
char* cameraShutterSpeed = "B"; // //placeholder to store the value of the shutterspeed set in camera; "B" is for bulb.
-int captureDuration = 10; //placeholder to store the value of the bulb shot this should be taken as input. note that my primary goal is in fact to perform bulb captures. but this should be extended for sure to take Shutter Speed capture as set in camera
+int captureDuration = 10; //placeholder to store the value of the bulb shot this should be taken as input. note that my primary goal is in fact to perform bulb captures. but this should be extended for sure to take Shutter Speed capture as set in camera
static int NumberPix(Camera *camera);
static char* loadCmd (Camera *camera,char* cmd);
@@ -120,7 +120,7 @@ struct _CameraPrivateLibrary {
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
if (camera->pl->udpsocket > 0) {
close (camera->pl->udpsocket);
@@ -265,7 +265,7 @@ delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
/**
* Get the file info here and write it to space provided by caller.
- *
+ *
* \param info Space provided by caller in which file info is written.
*
* This function is a CameraFilesystem method.
@@ -351,7 +351,7 @@ int
storage_info_func (CameraFilesystem *fs,
CameraStorageInformation **storageinformations,
int *nrofstorageinformations, void *data,
- GPContext *context)
+ GPContext *context)
{
/*Camera *camera = data;*/
@@ -419,7 +419,7 @@ loadCmd (Camera *camera,char* cmd) {
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
return NULL;
} else {
- /* read the XML that is now in Buffer*/
+ /* read the XML that is now in Buffer*/
GP_LOG_D("result %s\n", lmb.data);
/* <?xml version="1.0" encoding="UTF-8"?> <camrply><result>ok</result></camrply> */
@@ -657,7 +657,7 @@ static void focusOut(Camera *camera) {
/*
-this is the XML sample to be parsed by the function below NumberPix()
+this is the XML sample to be parsed by the function below NumberPix()
<?xml version="1.0" encoding="UTF-8"?>
<camrply><result>ok</result><current_position>341</current_position><total_content_number>372</total_content_number><content_number>342</content_number></camrply>
@@ -682,9 +682,9 @@ NumberPix(Camera *camera) {
int numpics = 0;
char *temp = loadCmd(camera,"cam.cgi?mode=get_content_info");
xmlDocPtr doc = xmlParseDoc((unsigned char*) temp);
- xmlNodePtr cur = NULL;
+ xmlNodePtr cur = NULL;
- cur = xmlDocGetRootElement(doc);
+ cur = xmlDocGetRootElement(doc);
if (cur == NULL) {
GP_LOG_E("empty xml result document");
@@ -724,7 +724,7 @@ NumberPix(Camera *camera) {
return numpics;
}
-/*utility function to creat a SOAP envelope for the lumix cam */
+/*utility function to creat a SOAP envelope for the lumix cam */
static char*
SoapEnvelop(int start, int num){
static char Envelop[1000];
@@ -833,7 +833,7 @@ GetPixRange(Camera *camera, int start, int num) {
}
xchar = xmlNodeGetContent (output);
GP_LOG_D("content of %s is %s", output->name, xchar);
- /*
+ /*
<DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/">
<item id="1030822" parentID="0" restricted="0">
@@ -1103,7 +1103,7 @@ static struct aperturemap {
};
static int
-camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
+camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
{
CameraWidget *widget,*section;
int ret, i, valset;
@@ -1266,7 +1266,7 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
}
static int
-camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
+camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
{
CameraWidget *widget;
char *val;
@@ -1380,13 +1380,13 @@ camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
static char*
processNode(xmlTextReaderPtr reader) {
- char* ret ="";
+ char* ret ="";
char* lookupImgtag="";
switch (ReadoutMode) {
case 0 : //'jpg
lookupImgtag = "CAM_RAW_JPG";
- break;
+ break;
case 1 :// 'raw
lookupImgtag = "CAM_RAW";
break;
@@ -1540,16 +1540,16 @@ ReadImageFromCamera(Camera *camera, CameraFilePath *path, GPContext *context) {
switchToPlayMode (camera);
- reader = xmlReaderForDoc((xmlChar*)GetPixRange(camera,NumberPix(camera)-1,1), NULL,"noname.xml", XML_PARSE_DTDATTR | /* default DTD attributes */ XML_PARSE_NOENT);
+ reader = xmlReaderForDoc((xmlChar*)GetPixRange(camera,NumberPix(camera)-1,1), NULL,"noname.xml", XML_PARSE_DTDATTR | /* default DTD attributes */ XML_PARSE_NOENT);
ret = xmlTextReaderRead(reader);
while (ret == 1) {
- imageURL = processNode(reader);
+ imageURL = processNode(reader);
if (strlen(imageURL))
- break;
+ break;
ret = xmlTextReaderRead(reader);
}
- GP_DEBUG("the image URL is %s\n",imageURL);
+ GP_DEBUG("the image URL is %s\n",imageURL);
image = strdup(imageURL);
nRead = 0;
CURL* imageUrl;
@@ -1635,8 +1635,8 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GP
return ret;
- if (strcmp(cameraShutterSpeed, "B")!=0) {
- sleep(captureDuration); // Sleep for the duration to simulate exposure, if this is in Bulb mode
+ if (strcmp(cameraShutterSpeed, "B")!=0) {
+ sleep(captureDuration); // Sleep for the duration to simulate exposure, if this is in Bulb mode
} else {
sleep(3);
}
@@ -1668,7 +1668,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GP
}
/**
-* Fill out the summary with textual information about the current
+* Fill out the summary with textual information about the current
* state of the camera (like pictures taken, etc.).
*
* This function is a method of the Camera object.
@@ -1682,7 +1682,7 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
/**
* Return the camera drivers manual.
-* If you would like to tell the user some information about how
+* If you would like to tell the user some information about how
* to use the camera or the driver, this is the place to do.
*
* This function is a method of the Camera object.
@@ -1829,8 +1829,8 @@ int camera_abilities (CameraAbilitiesList *list) {
a.status = GP_DRIVER_STATUS_EXPERIMENTAL;
a.port = GP_PORT_IP;
a.operations = GP_CAPTURE_IMAGE| GP_OPERATION_CAPTURE_VIDEO | GP_OPERATION_CONFIG;
- a.file_operations = GP_FILE_OPERATION_PREVIEW ;
- /* it should be possible to browse and DL images the files using the ReadImageFromCamera() function but for now lets keep it simple*/
+ a.file_operations = GP_FILE_OPERATION_PREVIEW ;
+ /* it should be possible to browse and DL images the files using the ReadImageFromCamera() function but for now lets keep it simple*/
a.folder_operations = GP_FOLDER_OPERATION_NONE;
return gp_abilities_list_append(list, a);
}
@@ -1865,7 +1865,7 @@ CameraFilesystemFuncs fsfuncs = {
* This is a camlib API function.
*/
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
GPPortInfo info;
int ret;
@@ -1920,7 +1920,7 @@ camera_init (Camera *camera, GPContext *context)
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "Lumix Wifi");
diff --git a/camlibs/mars/library.c b/camlibs/mars/library.c
index 2ce113aac..beebe73d4 100644
--- a/camlibs/mars/library.c
+++ b/camlibs/mars/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -68,11 +68,11 @@ static const struct {
{"Precision Mini, Model HA513A", GP_DRIVER_STATUS_EXPERIMENTAL, 0x093a, 0x010f},
{"Digital camera, CD302N", GP_DRIVER_STATUS_EXPERIMENTAL, 0x093a, 0x010e},
{"INNOVAGE Mini Digital, CD302N", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010e},
- {"Argus DC-1610", GP_DRIVER_STATUS_EXPERIMENTAL, 0x093a, 0x010f},
- {"Argus DC-1620", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010f},
+ {"Argus DC-1610", GP_DRIVER_STATUS_EXPERIMENTAL, 0x093a, 0x010f},
+ {"Argus DC-1620", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010f},
{"Philips P44417B keychain camera", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010e},
{"Sakar Digital no. 77379", GP_DRIVER_STATUS_EXPERIMENTAL, 0x093a, 0x010f},
- {"ION digital camera", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010f},
+ {"ION digital camera", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010f},
{"Argus QuickClix", GP_DRIVER_STATUS_DEPRECATED, 0x093a, 0x010f},
{"Pixart Gemini Keychain Camera", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010e},
{"Sakar Digital no. 56379 Spyshot", GP_DRIVER_STATUS_TESTING, 0x093a, 0x010e},
@@ -92,7 +92,7 @@ camera_id (CameraText *id)
int
camera_abilities (CameraAbilitiesList *list)
{
- int i;
+ int i;
CameraAbilities a;
for (i = 0; models[i].name; i++) {
@@ -108,8 +108,8 @@ camera_abilities (CameraAbilitiesList *list)
else
a.operations = GP_OPERATION_CAPTURE_IMAGE;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
- a.file_operations = GP_FILE_OPERATION_PREVIEW
- | GP_FILE_OPERATION_RAW;
+ a.file_operations = GP_FILE_OPERATION_PREVIEW
+ | GP_FILE_OPERATION_RAW;
gp_abilities_list_append (list, a);
}
return GP_OK;
@@ -124,25 +124,25 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
"Mars MR97310 camera.\nThere is %i photo in it.\n",
"Mars MR97310 camera.\nThere are %i photos in it.\n",
num_pics), num_pics
- );
+ );
return GP_OK;
}
-static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
+static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
{
- strcpy(manual->text,
+ strcpy(manual->text,
_(
"This driver supports cameras with Mars MR97310 chip (and direct\n"
"equivalents ??Pixart PACx07?\?).\n"
"These cameras do not support deletion of photos, nor uploading\n"
"of data.\n"
- "Decoding of compressed photos may or may not work well\n"
+ "Decoding of compressed photos may or may not work well\n"
"and does not work equally well for all supported cameras.\n"
"Photo data processing for Argus QuickClix is NOT SUPPORTED.\n"
"If present on the camera, video clip frames are downloaded \n"
"as consecutive still photos.\n"
"For further details please consult libgphoto2/camlibs/README.\n"
- ));
+ ));
return (GP_OK);
}
@@ -161,7 +161,7 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int i = 0, n;
char name[30];
@@ -169,7 +169,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
for (i=0; i < n; i++) {
if ((camera->pl->info[8*i]&0x0f) == 1) {
sprintf (name, "mr%03isnd.wav", i+1);
- } else
+ } else
sprintf (name, "mr%03ipic.ppm", i+1);
gp_list_append (list, name, NULL);
}
@@ -191,9 +191,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *user_data,
GPContext *context)
{
- Camera *camera = user_data;
+ Camera *camera = user_data;
int w=0, h = 0, b = 0, k;
- unsigned char *data;
+ unsigned char *data;
unsigned char *ppm;
unsigned char *p_data = NULL;
unsigned char gtable[256], photo_code, res_code, compressed;
@@ -209,11 +209,11 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* Get the number of the photo on the camera */
- k = gp_filesystem_number (camera->fs, "/", filename, context);
+ k = gp_filesystem_number (camera->fs, "/", filename, context);
/* Determine the resolution setting from the PAT table */
photo_code = camera->pl->info[8*k];
res_code = photo_code & 0x0f;
- /* Compression presence or absence is seen here, and is given again
+ /* Compression presence or absence is seen here, and is given again
* by the camera, in the header of raw data for each photo.
*/
compressed = (photo_code >> 4) & 2;
@@ -223,31 +223,31 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
case 2: w = 352; h = 288; break;
case 6: w = 320; h = 240; break;
case 8: w = 640; h = 480; break;
- default: w = 640; h = 480;
+ default: w = 640; h = 480;
}
-
- GP_DEBUG ("height is %i\n", h);
-
+
+ GP_DEBUG ("height is %i\n", h);
+
b = mars_get_pic_data_size(camera->pl->info, k);
raw_size = b;
/* Now increase b from "actual size" to _downloaded_ size. */
b = ((b+ 0x1b0)/0x2000 + 1) * 0x2000;
if (w*h > b) {
- GP_DEBUG ("w=%d, h=%d, w*h=%d, bytes read=%d\n", w,h,w*h,b);
+ GP_DEBUG ("w=%d, h=%d, w*h=%d, bytes read=%d\n", w,h,w*h,b);
return GP_ERROR_CORRUPTED_DATA;
}
data = calloc (b,1);
if (!data) return GP_ERROR_NO_MEMORY;
- GP_DEBUG ("buffersize= %i = 0x%x bytes\n", b,b);
+ GP_DEBUG ("buffersize= %i = 0x%x bytes\n", b,b);
- mars_read_picture_data (camera, camera->pl->info,
+ mars_read_picture_data (camera, camera->pl->info,
camera->port, (char *)data, b, k);
/* The first 128 bytes are junk, so we toss them.*/
memmove(data, data+128, b - 128);
- if (audio) {
+ if (audio) {
p_data = malloc (raw_size+256);
if (!p_data) {free (data); return GP_ERROR_NO_MEMORY;}
memset (p_data, 0, raw_size+256);
@@ -271,7 +271,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
p_data[40] = (raw_size)&0xff;
p_data[41] = ((raw_size)>>8)&0xff;
p_data[42] = ((raw_size)>>16)&0xff;
- p_data[43] = ((raw_size)>>24)&0xff;
+ p_data[43] = ((raw_size)>>24)&0xff;
memcpy (p_data+44, data, raw_size);
gp_file_set_mime_type(file, GP_MIME_WAV);
gp_file_set_data_and_size(file, (char *)p_data , raw_size+44);
@@ -281,14 +281,14 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
if (GP_FILE_TYPE_RAW == type) {
/* We keep the SOF marker. Actual data starts at byte 12.
- * Byte 6, upper nibble, is a code for compression mode. We
+ * Byte 6, upper nibble, is a code for compression mode. We
* use the lower nibble to store the resolution code.
* Then it is possible to know "everything" from a raw file.
- * Purpose of the info in bytes 7 thru 11 is currently unknown.
+ * Purpose of the info in bytes 7 thru 11 is currently unknown.
* A "raw" audio file will also have the WAV header prepended.
- * So do nothing to an audio file.
+ * So do nothing to an audio file.
*/
- if (!audio)
+ if (!audio)
data[6] = (data[6] | res_code);
gp_file_set_mime_type(file, GP_MIME_RAW);
gp_file_set_data_and_size(file, (char *)data , raw_size );
@@ -303,7 +303,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
mars_decompress (data + 12, p_data, w, h);
}
else memcpy (p_data, data + 12, w*h);
- gamma_factor = sqrt((float)data[7]/100.);
+ gamma_factor = sqrt((float)data[7]/100.);
if (gamma_factor <= .60)
gamma_factor = .60;
free(data);
@@ -318,7 +318,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
"# CREATOR: gphoto2, Mars library\n"
"%d %d\n"
"255\n", w, h);
- ptr = ppm + strlen ((char *)ppm);
+ ptr = ppm + strlen ((char *)ppm);
size = strlen ((char *)ppm) + (w * h * 3);
GP_DEBUG ("size = %i\n", size);
gp_ahd_decode (p_data, w , h , ptr, BAYER_TILE_RGGB);
@@ -364,10 +364,10 @@ camera_init(Camera *camera, GPContext *context)
camera->functions->summary = camera_summary;
camera->functions->about = camera_about;
camera->functions->exit = camera_exit;
-
+
GP_DEBUG ("Initializing the camera\n");
ret = gp_port_get_settings(camera->port,&settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
switch (camera->port->type) {
case GP_PORT_SERIAL:
@@ -386,10 +386,10 @@ camera_init(Camera *camera, GPContext *context)
}
ret = gp_port_set_settings(camera->port,settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
GP_DEBUG("interface = %i\n", settings.usb.interface);
- GP_DEBUG("inep = %x\n", settings.usb.inep);
+ GP_DEBUG("inep = %x\n", settings.usb.inep);
GP_DEBUG("outep = %x\n", settings.usb.outep);
/* Tell the CameraFilesystem where to get lists from */
diff --git a/camlibs/mars/mars.c b/camlibs/mars/mars.c
index 7b49c1eee..d27432465 100644
--- a/camlibs/mars/mars.c
+++ b/camlibs/mars/mars.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -37,13 +37,13 @@
#include "mars.h"
-#define GP_MODULE "mars"
+#define GP_MODULE "mars"
#define INIT 0xb5
#define GET_DATA 0x0f
-static int
-m_read (GPPort *port, char *data, int size)
+static int
+m_read (GPPort *port, char *data, int size)
{
int ret;
ret = gp_port_write(port, "\x21", 1);
@@ -52,8 +52,8 @@ m_read (GPPort *port, char *data, int size)
return gp_port_read(port, data, 16);
}
-static int
-m_command (GPPort *port, char *command, int size, char *response)
+static int
+m_command (GPPort *port, char *command, int size, char *response)
{
gp_port_write(port, command, size);
return m_read(port, response, 16);
@@ -61,34 +61,34 @@ m_command (GPPort *port, char *command, int size, char *response)
static int mars_routine (Info *info, GPPort *port, char param, int n);
-int
-mars_init (Camera *camera, GPPort *port, Info *info)
+int
+mars_init (Camera *camera, GPPort *port, Info *info)
{
char c[16];
unsigned char status = 0;
- memset(info,0, sizeof(*info));
+ memset(info,0, sizeof(*info));
memset(c,0,sizeof(c));
GP_DEBUG("Running mars_init\n");
- /* Init routine done twice, usually. First time is a dry run. But if
+ /* Init routine done twice, usually. First time is a dry run. But if
* camera reports 0x02 it is "jammed" and we must clear it.
- */
+ */
- m_read(port, c, 16);
+ m_read(port, c, 16);
if (c[0] == 0x02) {
gp_port_write(port, "\x19", 1);
gp_port_read(port, c, 16);
}
else {
- status = mars_routine (info, port, INIT, 0);
+ status = mars_routine (info, port, INIT, 0);
GP_DEBUG("status = 0x%x\n", status);
}
/* Not a typo. This _will_ download the config data ;) */
- mars_read_picture_data (camera, info, port, (char *)info, 0x2000, 0);
+ mars_read_picture_data (camera, info, port, (char *)info, 0x2000, 0);
/* Removing extraneous line(s) of data. See "protocol.txt" */
-
+
if ((info[0] == 0xff)&& (info[1] == 0)&&(info[2]==0xff))
memmove(info, info + 16, 0x1ff0); /* Saving config */
else
@@ -98,12 +98,12 @@ mars_init (Camera *camera, GPPort *port, Info *info)
return GP_OK;
}
-int
-mars_get_num_pics (Info *info)
+int
+mars_get_num_pics (Info *info)
{
unsigned int i = 0;
- for (i = 0; i < 0x3fe; i++)
+ for (i = 0; i < 0x3fe; i++)
if ( !(0xff - info[8*i]) ) {
GP_DEBUG ( "i is %i\n", i);
memcpy(info+0x1ff0, "i", 1);
@@ -120,25 +120,25 @@ mars_get_pic_data_size (Info *info, int n)
return (info[8*n+6]*0x100 + info[8*n+5])*0x100 + info[8*n+4];
}
-static int
-set_usb_in_endpoint (Camera *camera, int inep)
+static int
+set_usb_in_endpoint (Camera *camera, int inep)
{
GPPortSettings settings;
gp_port_get_settings ( camera ->port, &settings);
settings.usb.inep = inep;
GP_DEBUG("inep reset to %02X\n", inep);
return gp_port_set_settings ( camera ->port, settings);
-}
+}
-static int
-mars_read_data (GPPort *port, char *data, int size)
-{
+static int
+mars_read_data (GPPort *port, char *data, int size)
+{
int MAX_BULK = 0x2000;
int len = 0;
while(size > 0) {
len = (size>MAX_BULK)?MAX_BULK:size;
- gp_port_read (port, data, len);
+ gp_port_read (port, data, len);
data += len;
size -= len;
}
@@ -146,22 +146,22 @@ mars_read_data (GPPort *port, char *data, int size)
return 1;
}
-int
-mars_read_picture_data (Camera *camera, Info *info, GPPort *port,
- char *data, int size, int n)
+int
+mars_read_picture_data (Camera *camera, Info *info, GPPort *port,
+ char *data, int size, int n)
{
unsigned char c[16];
-
+
memset(c,0,sizeof(c));
/*Initialization routine for download. */
mars_routine (info, port, GET_DATA, n);
/*Data transfer begins*/
- set_usb_in_endpoint (camera, 0x82);
- mars_read_data (port, data, size);
- set_usb_in_endpoint (camera, 0x83);
+ set_usb_in_endpoint (camera, 0x82);
+ mars_read_data (port, data, size);
+ set_usb_in_endpoint (camera, 0x83);
return GP_OK;
-}
+}
int
mars_reset (GPPort *port)
@@ -286,7 +286,7 @@ int mars_decompress (unsigned char *inp, unsigned char *outp, int width,
}else if (col < 2) {
/* left column: relative to top pixel */
/* initial estimate */
- val += (tp + trp)/2;
+ val += (tp + trp)/2;
}else if (col > width - 3) {
/* left column: relative to top pixel */
val += (tp + lp + tlp +1)/3;
@@ -306,12 +306,12 @@ int mars_decompress (unsigned char *inp, unsigned char *outp, int width,
return GP_OK;
}
-static int
-mars_routine (Info *info, GPPort *port, char param, int n)
+static int
+mars_routine (Info *info, GPPort *port, char param, int n)
{
char c[16];
char start[2] = {0x19, 0x51};
- char do_something[2];
+ char do_something[2];
char address1[2];
char address2[2];
char address3[2];
@@ -319,7 +319,7 @@ mars_routine (Info *info, GPPort *port, char param, int n)
char address5[2];
char address6[2];
- do_something[0]= 0x19;
+ do_something[0]= 0x19;
do_something[1]=param;
/* See protocol.txt for my theories about what these mean. */
@@ -340,19 +340,19 @@ mars_routine (Info *info, GPPort *port, char param, int n)
memset(c,0,sizeof(c));
/*Routine used in initialization, photo download, and reset. */
- m_read(port, c, 16);
+ m_read(port, c, 16);
m_command(port, start, 2, c);
m_command(port, do_something, 2, c);
m_command(port, address1, 2, c);
c[0] = 0;
- gp_port_write(port, address2, 2);
+ gp_port_write(port, address2, 2);
/* Moving the memory cursor to the given address? */
- while (( c[0] != 0xa) ) {
+ while (( c[0] != 0xa) ) {
if (m_read(port, c, 16) < 16)
break;
}
-
+
m_command(port, address3, 2, c);
m_command(port, address4, 2, c);
m_command(port, address5, 2, c);
@@ -360,7 +360,7 @@ mars_routine (Info *info, GPPort *port, char param, int n)
gp_port_write(port, "\x19", 1);
gp_port_read(port, c , 16);
/* Next thing is to switch the inep. Some cameras need a pause here */
- usleep (MARS_SLEEP);
+ usleep (MARS_SLEEP);
return(c[0]);
}
@@ -389,10 +389,10 @@ histogram (unsigned char *data, unsigned int size, int *htable_r, int *htable_g,
{
int x;
/* Initializations */
- for (x = 0; x < 0x100; x++) {
- htable_r[x] = 0;
- htable_g[x] = 0;
- htable_b[x] = 0;
+ for (x = 0; x < 0x100; x++) {
+ htable_r[x] = 0;
+ htable_g[x] = 0;
+ htable_b[x] = 0;
}
/* Building the histograms */
for (x = 0; x < (size * 3); x += 3)
@@ -420,9 +420,9 @@ mars_white_balance (unsigned char *data, unsigned int size, float saturation,
x = 1;
for (r = 48; r < 208; r++)
{
- x += htable_r[r];
+ x += htable_r[r];
x += htable_g[r];
- x += htable_r[r];
+ x += htable_r[r];
}
new_gamma = sqrt((double) (x * 1.5) / (double) (size * 3));
x=0;
@@ -439,14 +439,14 @@ mars_white_balance (unsigned char *data, unsigned int size, float saturation,
gp_gamma_fill_table(gtable, gamma);
/* ---------------- BRIGHT DOTS ------------------- */
- max = size / 200;
+ max = size / 200;
histogram(data, size, htable_r, htable_g, htable_b);
- for (r=0xfe, x=0; (r > 32) && (x < max); r--)
- x += htable_r[r];
- for (g=0xfe, x=0; (g > 32) && (x < max); g--)
+ for (r=0xfe, x=0; (r > 32) && (x < max); r--)
+ x += htable_r[r];
+ for (g=0xfe, x=0; (g > 32) && (x < max); g--)
x += htable_g[g];
- for (b=0xfe, x=0; (b > 32) && (x < max); b--)
+ for (b=0xfe, x=0; (b > 32) && (x < max); b--)
x += htable_b[b];
r_factor = (double) 0xfd / r;
g_factor = (double) 0xfd / g;
@@ -483,11 +483,11 @@ mars_white_balance (unsigned char *data, unsigned int size, float saturation,
max = size / 200; /* 1/200 = 0.5% */
histogram(data, size, htable_r, htable_g, htable_b);
- for (r=0, x=0; (r < 96) && (x < max); r++)
- x += htable_r[r];
- for (g=0, x=0; (g < 96) && (x < max); g++)
+ for (r=0, x=0; (r < 96) && (x < max); r++)
+ x += htable_r[r];
+ for (g=0, x=0; (g < 96) && (x < max); g++)
x += htable_g[g];
- for (b=0, x=0; (b < 96) && (x < max); b++)
+ for (b=0, x=0; (b < 96) && (x < max); b++)
x += htable_b[b];
r_factor = (double) 0xfe / (0xff-r);
@@ -504,7 +504,7 @@ mars_white_balance (unsigned char *data, unsigned int size, float saturation,
b_factor = (b_factor / max_factor) * 1.15;
}
GP_DEBUG(
- "White balance (dark): r=%1d, g=%1d, b=%1d, fr=%1.3f, fg=%1.3f, fb=%1.3f\n",
+ "White balance (dark): r=%1d, g=%1d, b=%1d, fr=%1.3f, fg=%1.3f, fb=%1.3f\n",
r, g, b, r_factor, g_factor, b_factor);
for (x = 0; x < (size * 3); x += 3)
@@ -532,15 +532,15 @@ mars_white_balance (unsigned char *data, unsigned int size, float saturation,
d = (int) (r + g + b) /3.;
if ( r > d )
r = r + (int) ((r - d) * (0xff-r)/(0x100-d) * saturation);
- else
+ else
r = r + (int) ((r - d) * (0xff-d)/(0x100-r) * saturation);
if (g > d)
g = g + (int) ((g - d) * (0xff-g)/(0x100-d) * saturation);
- else
+ else
g = g + (int) ((g - d) * (0xff-d)/(0x100-g) * saturation);
if (b > d)
b = b + (int) ((b - d) * (0xff-b)/(0x100-d) * saturation);
- else
+ else
b = b + (int) ((b - d) * (0xff-d)/(0x100-b) * saturation);
data[x+0] = CLAMP(r);
data[x+1] = CLAMP(g);
diff --git a/camlibs/mars/mars.h b/camlibs/mars/mars.h
index b4a3f504c..c6f66b2ab 100644
--- a/camlibs/mars/mars.h
+++ b/camlibs/mars/mars.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -46,7 +46,7 @@ int mars_read_picture_data (Camera *camera, Info *info,
GPPort *port, char *data, int size, int n);
int mars_decompress (unsigned char *inp ,unsigned char *outp, int w, int h);
-int histogram (unsigned char *data, unsigned int size, int *htable_r,
+int histogram (unsigned char *data, unsigned int size, int *htable_r,
int *htable_g, int *htable_b);
int mars_white_balance (unsigned char *data, unsigned int size, float saturation,
float image_gamma);
diff --git a/camlibs/minolta/dimagev/capture.c b/camlibs/minolta/dimagev/capture.c
index dbbc91c52..f69266cef 100644
--- a/camlibs/minolta/dimagev/capture.c
+++ b/camlibs/minolta/dimagev/capture.c
@@ -73,23 +73,23 @@ int dimagev_shutter(dimagev_t *dimagev) {
if ( gp_port_write(dimagev->dev, (char *)p->buffer, p->length) < GP_OK ) {
GP_DEBUG( "dimagev_shutter::unable to write packet");
-
+
if ( p != NULL ) {
free(p);
}
-
+
return GP_ERROR_IO;
}
if ( p != NULL ) {
free(p);
}
-
+
if ( sleep(1) != 0 ) {
GP_DEBUG( "dimagev_shutter::sleep() returned non-zero value");
}
-
+
if ( gp_port_read(dimagev->dev, (char *)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_shutter::no response from camera");
return GP_ERROR_IO;
@@ -116,7 +116,7 @@ int dimagev_shutter(dimagev_t *dimagev) {
if ( sleep(1) != 0 ) {
GP_DEBUG( "dimagev_shutter::sleep() returned non-zero value");
}
-
+
if ( ( p = dimagev_read_packet(dimagev) ) == NULL ) {
GP_DEBUG( "dimagev_shutter::unable to read packet");
@@ -148,7 +148,7 @@ int dimagev_shutter(dimagev_t *dimagev) {
GP_DEBUG( "dimagev_shutter::unable to send EOT");
return GP_ERROR_IO;
}
-
+
if ( gp_port_read(dimagev->dev, (char *)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_shutter::no response from camera");
return GP_ERROR_IO;
diff --git a/camlibs/minolta/dimagev/data.c b/camlibs/minolta/dimagev/data.c
index d98365829..c4f120dec 100644
--- a/camlibs/minolta/dimagev/data.c
+++ b/camlibs/minolta/dimagev/data.c
@@ -86,7 +86,7 @@ int dimagev_get_camera_data(dimagev_t *dimagev) {
free(p);
return GP_ERROR_IO;
}
-
+
if ( gp_port_read(dimagev->dev, (char*)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_get_camera_data::no response from camera");
free(p);
@@ -168,7 +168,7 @@ int dimagev_send_data(dimagev_t *dimagev) {
free(export_data);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -203,7 +203,7 @@ int dimagev_send_data(dimagev_t *dimagev) {
}
free(p);
-
+
if ( gp_port_read(dimagev->dev, (char*)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_send_data::no response from camera");
return GP_ERROR_IO;
@@ -229,7 +229,7 @@ int dimagev_send_data(dimagev_t *dimagev) {
GP_DEBUG( "dimagev_send_data::unable to send EOT");
return GP_ERROR_IO;
}
-
+
if ( gp_port_read(dimagev->dev, (char*)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_send_data::no response from camera");
return GP_ERROR_IO;
diff --git a/camlibs/minolta/dimagev/delete.c b/camlibs/minolta/dimagev/delete.c
index eefbed3f0..68ad32cc9 100644
--- a/camlibs/minolta/dimagev/delete.c
+++ b/camlibs/minolta/dimagev/delete.c
@@ -73,7 +73,7 @@ int dimagev_delete_picture(dimagev_t *dimagev, int file_number) {
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -90,7 +90,7 @@ int dimagev_delete_picture(dimagev_t *dimagev, int file_number) {
return GP_ERROR_IO;
}
-
+
if ( ( p = dimagev_read_packet(dimagev) ) == NULL ) {
GP_DEBUG( "dimagev_delete_picture::unable to read packet");
return GP_ERROR_IO;
@@ -101,7 +101,7 @@ int dimagev_delete_picture(dimagev_t *dimagev, int file_number) {
free(p);
return GP_ERROR;
}
-
+
free(p);
if ( raw->buffer[0] != (unsigned char) 0 ) {
@@ -121,7 +121,7 @@ int dimagev_delete_picture(dimagev_t *dimagev, int file_number) {
GP_DEBUG( "dimagev_delete_picture::no response from camera");
return GP_ERROR_IO;
}
-
+
switch ( char_buffer ) {
case DIMAGEV_ACK:
break;
@@ -183,7 +183,7 @@ int dimagev_delete_all(dimagev_t *dimagev) {
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -200,7 +200,7 @@ int dimagev_delete_all(dimagev_t *dimagev) {
return GP_ERROR_IO;
}
-
+
if ( ( p = dimagev_read_packet(dimagev) ) == NULL ) {
GP_DEBUG( "dimagev_delete_all::unable to read packet");
return GP_ERROR_IO;
@@ -211,7 +211,7 @@ int dimagev_delete_all(dimagev_t *dimagev) {
free(p);
return GP_ERROR_NO_MEMORY;
}
-
+
free(p);
if ( raw->buffer[0] != (unsigned char) 0 ) {
@@ -231,7 +231,7 @@ int dimagev_delete_all(dimagev_t *dimagev) {
GP_DEBUG( "dimagev_delete_all::no response from camera");
return GP_ERROR_IO;
}
-
+
switch ( char_buffer ) {
case DIMAGEV_ACK:
break;
diff --git a/camlibs/minolta/dimagev/dimagev.c b/camlibs/minolta/dimagev/dimagev.c
index 0f9770920..b3a27197e 100644
--- a/camlibs/minolta/dimagev/dimagev.c
+++ b/camlibs/minolta/dimagev/dimagev.c
@@ -44,7 +44,7 @@
#define GP_MODULE "dimagev"
-int camera_id (CameraText *id)
+int camera_id (CameraText *id)
{
#if defined HAVE_STRNCPY
strncpy(id->text, "minolta-dimagev", sizeof(id->text));
@@ -55,7 +55,7 @@ int camera_id (CameraText *id)
return GP_OK;
}
-int camera_abilities (CameraAbilitiesList *list)
+int camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -71,9 +71,9 @@ int camera_abilities (CameraAbilitiesList *list)
a.speed[1] = 0;
a.operations = GP_OPERATION_CAPTURE_IMAGE |
GP_OPERATION_CAPTURE_PREVIEW;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
- a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
+ a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
GP_FOLDER_OPERATION_DELETE_ALL;
gp_abilities_list_append(list, a);
@@ -81,7 +81,7 @@ int camera_abilities (CameraAbilitiesList *list)
return GP_OK;
}
-static int camera_exit (Camera *camera, GPContext *context)
+static int camera_exit (Camera *camera, GPContext *context)
{
/* Set the camera back into a normal mode. */
if (camera->pl) {
@@ -114,8 +114,8 @@ static int camera_exit (Camera *camera, GPContext *context)
return GP_OK;
}
-static int file_list_func (CameraFilesystem *fs, const char *folder,
- CameraList *list, void *data, GPContext *context)
+static int file_list_func (CameraFilesystem *fs, const char *folder,
+ CameraList *list, void *data, GPContext *context)
{
Camera *camera = data;
int ret;
@@ -129,13 +129,13 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
GP_DEBUG( "camera_file_list::unable to populate list");
return ret;
}
-
+
return GP_OK;
}
static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
- CameraFile *file, void *data, GPContext *context)
+ CameraFile *file, void *data, GPContext *context)
{
Camera *camera = data;
int file_number=0, result;
@@ -166,9 +166,9 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
return GP_OK;
}
-static int delete_file_func (CameraFilesystem *fs, const char *folder,
+static int delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = data;
int file_number=0;
@@ -180,7 +180,7 @@ static int delete_file_func (CameraFilesystem *fs, const char *folder,
return dimagev_delete_picture(camera->pl, (file_number + 1 ));
}
-static int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context)
+static int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context)
{
if (type != GP_CAPTURE_IMAGE)
return (GP_ERROR_NOT_SUPPORTED);
@@ -211,7 +211,7 @@ static int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePat
}
static int put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
- CameraFileType type, CameraFile *file, void *data, GPContext *context)
+ CameraFileType type, CameraFile *file, void *data, GPContext *context)
{
Camera *camera = data;
@@ -219,14 +219,14 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
}
static int delete_all_func (CameraFilesystem *fs, const char *folder,
- void *data, GPContext *context)
+ void *data, GPContext *context)
{
Camera *camera = data;
return dimagev_delete_all(camera->pl);
}
-static int camera_summary (Camera *camera, CameraText *summary, GPContext *context)
+static int camera_summary (Camera *camera, CameraText *summary, GPContext *context)
{
int i = 0, count = 0;
@@ -408,7 +408,7 @@ static int camera_summary (Camera *camera, CameraText *summary, GPContext *conte
i = snprintf(&(summary->text[count]), sizeof(summary->text) - count, _("Bad value for card status %d"), camera->pl->status->card_status);
break;
}
-
+
if ( i > 0 ) {
count += i;
}
@@ -417,7 +417,7 @@ static int camera_summary (Camera *camera, CameraText *summary, GPContext *conte
return GP_OK;
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
#if defined HAVE_SNPRINTF
snprintf(about->text, sizeof(about->text),
@@ -437,7 +437,7 @@ static CameraFilesystemFuncs fsfuncs = {
.delete_all_func = delete_all_func,
};
-int camera_init (Camera *camera, GPContext *context)
+int camera_init (Camera *camera, GPContext *context)
{
GPPortSettings settings;
diff --git a/camlibs/minolta/dimagev/download.c b/camlibs/minolta/dimagev/download.c
index 5d74b5580..6015b7036 100644
--- a/camlibs/minolta/dimagev/download.c
+++ b/camlibs/minolta/dimagev/download.c
@@ -47,7 +47,7 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
GP_DEBUG( "dimagev_get_picture::file_number is %d", file_number);
/* Maybe check if it exists? Check the file type? */
-
+
/* First make the command packet. */
command_buffer[0] = 0x04;
command_buffer[1] = (unsigned char)( file_number / 256 );
@@ -66,7 +66,7 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -94,7 +94,7 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
free(p);
return GP_ERROR_NO_MEMORY;
}
-
+
free(p);
total_packets = (int) r->buffer[0];
@@ -118,7 +118,7 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
free(data);
return GP_ERROR_IO;
}
-
+
if ( ( p = dimagev_read_packet(dimagev) ) == NULL ) {
/*
GP_DEBUG( "dimagev_get_picture::unable to read packet");
@@ -146,7 +146,7 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
free(p);
return GP_ERROR_NO_MEMORY;
}
-
+
free(p);
memcpy(&( data[ ( size + 1) ] ), r->buffer, (size_t) r->length );
@@ -169,7 +169,7 @@ int dimagev_get_picture(dimagev_t *dimagev, int file_number, CameraFile *file) {
free(data);
return GP_ERROR_IO;
}
-
+
switch ( char_buffer ) {
case DIMAGEV_ACK:
break;
@@ -226,7 +226,7 @@ int dimagev_get_thumbnail(dimagev_t *dimagev, int file_number, CameraFile *file)
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -254,7 +254,7 @@ int dimagev_get_thumbnail(dimagev_t *dimagev, int file_number, CameraFile *file)
free(p);
return GP_ERROR_NO_MEMORY;
}
-
+
free(p);
/* Unlike normal images, we are guaranteed 9600 bytes *exactly*. */
@@ -279,7 +279,7 @@ int dimagev_get_thumbnail(dimagev_t *dimagev, int file_number, CameraFile *file)
free(ycrcb_data);
return GP_ERROR_IO;
}
-
+
if ( ( p = dimagev_read_packet(dimagev) ) == NULL ) {
GP_DEBUG( "dimagev_get_thumbnail::unable to read packet");
free(ycrcb_data);
@@ -292,7 +292,7 @@ int dimagev_get_thumbnail(dimagev_t *dimagev, int file_number, CameraFile *file)
free(ycrcb_data);
return GP_ERROR_NO_MEMORY;
}
-
+
free(p);
memcpy(&( ycrcb_data[ ( size + 1) ] ), r->buffer, (size_t) r->length );
@@ -317,7 +317,7 @@ int dimagev_get_thumbnail(dimagev_t *dimagev, int file_number, CameraFile *file)
free(ycrcb_data);
return GP_ERROR_IO;
}
-
+
switch ( char_buffer ) {
case DIMAGEV_ACK:
break;
diff --git a/camlibs/minolta/dimagev/info.c b/camlibs/minolta/dimagev/info.c
index bd6d1525c..0f254e706 100644
--- a/camlibs/minolta/dimagev/info.c
+++ b/camlibs/minolta/dimagev/info.c
@@ -93,7 +93,7 @@ int dimagev_get_camera_info(dimagev_t *dimagev) {
free(p);
return GP_ERROR_IO;
}
-
+
if ( gp_port_read(dimagev->dev, (char *)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_get_camera_info::no response from camera");
free(p);
diff --git a/camlibs/minolta/dimagev/packet.c b/camlibs/minolta/dimagev/packet.c
index 165dfa803..062ae6b94 100644
--- a/camlibs/minolta/dimagev/packet.c
+++ b/camlibs/minolta/dimagev/packet.c
@@ -50,14 +50,14 @@
dimagev_packet *dimagev_make_packet(const unsigned char *const buffer, unsigned int length, unsigned int seq) {
unsigned int i=0, checksum=0;
dimagev_packet *p;
-
+
if ( ( p = calloc(1, sizeof(dimagev_packet) ) ) == NULL ) {
GP_DEBUG("dimagev_make_packet::unable to allocate packet");
return NULL;
}
p->length = length + 7;
-
+
p->buffer[0] = DIMAGEV_STX;
p->buffer[1] = seq & 0x000000ff;
p->buffer[2] = ( p->length & 0x0000ff00) >> 8;
@@ -73,7 +73,7 @@ dimagev_packet *dimagev_make_packet(const unsigned char *const buffer, unsigned
p->buffer[(p->length - 3)] = (unsigned char) ((checksum & 0x0000ff00) >> 8 );
p->buffer[(p->length - 2)] = (unsigned char) ( checksum & 0x000000ff );
p->buffer[(p->length - 1)] = (unsigned char) DIMAGEV_ETX;
-
+
return p;
}
@@ -149,14 +149,14 @@ dimagev_packet *dimagev_read_packet(dimagev_t *dimagev) {
if ( dimagev_verify_packet(p) < GP_OK ) {
GP_DEBUG( "dimagev_read_packet::got an invalid packet - will try to send NAK");
free(p);
-
+
/* Send a NAK */
char_buffer = DIMAGEV_NAK;
if ( gp_port_write(dimagev->dev, (char *)&char_buffer, 1) < GP_OK ) {
GP_DEBUG( "dimagev_read_packet::unable to send NAK");
return NULL;
}
-
+
/* Who likes recursion? */
return dimagev_read_packet(dimagev);
diff --git a/camlibs/minolta/dimagev/status.c b/camlibs/minolta/dimagev/status.c
index 07b2c60e8..17a704ce3 100644
--- a/camlibs/minolta/dimagev/status.c
+++ b/camlibs/minolta/dimagev/status.c
@@ -114,7 +114,7 @@ int dimagev_get_camera_status(dimagev_t *dimagev) {
free(p);
return GP_ERROR;
}
-
+
free(p);
if ( ( dimagev->status = dimagev_import_camera_status(raw->buffer) ) == NULL ) {
@@ -136,7 +136,7 @@ dimagev_status_t *dimagev_import_camera_status(unsigned char *raw_data) {
if ( raw_data == NULL ) {
return NULL;
}
-
+
if ( ( processed_data = malloc(sizeof(dimagev_status_t)) ) == NULL ) {
return NULL;
}
diff --git a/camlibs/minolta/dimagev/upload.c b/camlibs/minolta/dimagev/upload.c
index 11da451d5..c653a571b 100644
--- a/camlibs/minolta/dimagev/upload.c
+++ b/camlibs/minolta/dimagev/upload.c
@@ -69,7 +69,7 @@ int dimagev_put_file(dimagev_t* dimagev, CameraFile *file) {
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -118,7 +118,7 @@ int dimagev_put_file(dimagev_t* dimagev, CameraFile *file) {
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
@@ -163,7 +163,7 @@ int dimagev_put_file(dimagev_t* dimagev, CameraFile *file) {
free(p);
return GP_ERROR_IO;
}
-
+
free(p);
switch ( char_buffer ) {
diff --git a/camlibs/minolta/dimagev/util.c b/camlibs/minolta/dimagev/util.c
index aa715cbaf..408a8d861 100644
--- a/camlibs/minolta/dimagev/util.c
+++ b/camlibs/minolta/dimagev/util.c
@@ -89,7 +89,7 @@ unsigned char *dimagev_ycbcr_to_ppm(unsigned char *ycbcr) {
rgb_current[2] = (unsigned char) ( magic_b > 255 ? 0 : magic_b );
magic_r = ( ( ycrcb_current[3] > (unsigned char) 128 ? 128 : ycrcb_current[3] ) - 128 ) * ( 2 - ( 2 * Y_COEFF ) ) + ycrcb_current[0];
rgb_current[0] = (unsigned char) ( magic_r > 255 ? 0 : magic_r );
- magic_g = (( ycrcb_current[0] - ( CR_COEFF * rgb_current[2] ) ) - ( Y_COEFF * rgb_current[0])) / CB_COEFF ;
+ magic_g = (( ycrcb_current[0] - ( CR_COEFF * rgb_current[2] ) ) - ( Y_COEFF * rgb_current[0])) / CB_COEFF ;
rgb_current[1] = (unsigned char) ( magic_g > 255 ? 0 : magic_g );
/* Wipe everything clean. */
@@ -99,7 +99,7 @@ unsigned char *dimagev_ycbcr_to_ppm(unsigned char *ycbcr) {
rgb_current[5] = (unsigned char) ( magic_b > 255 ? 0 : magic_b );
magic_r = ( ( ycrcb_current[3] > (unsigned char) 128 ? 128 : ycrcb_current[3] ) - 128 ) * ( 2 - ( 2 * Y_COEFF ) ) + ycrcb_current[1];
rgb_current[3] = (unsigned char) ( magic_r > 255 ? 0 : magic_r );
- magic_g = (( ycrcb_current[1] - ( CR_COEFF * rgb_current[5] ) ) - ( Y_COEFF * rgb_current[3])) / CB_COEFF ;
+ magic_g = (( ycrcb_current[1] - ( CR_COEFF * rgb_current[5] ) ) - ( Y_COEFF * rgb_current[3])) / CB_COEFF ;
rgb_current[4] = (unsigned char) ( magic_g > 255 ? 0 : magic_g );
/* Wipe everything clean. */
diff --git a/camlibs/mustek/image.h b/camlibs/mustek/image.h
index 9a4c191ec..265ad76e5 100644
--- a/camlibs/mustek/image.h
+++ b/camlibs/mustek/image.h
@@ -21,7 +21,7 @@
*/
#ifndef DEFINE_IMAGE_H
#define DEFINE_IMAGE_H
-
+
int mdc800_correctImageData (unsigned char*, int,int,int );
diff --git a/camlibs/mustek/io.c b/camlibs/mustek/io.c
index 0bd1f24b9..8732e4e44 100644
--- a/camlibs/mustek/io.c
+++ b/camlibs/mustek/io.c
@@ -15,13 +15,13 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+
/*
- * gphoto driver for the Mustek MDC800 Digital Camera. The driver
+ * gphoto driver for the Mustek MDC800 Digital Camera. The driver
* supports rs232 and USB. It automatically detects which Kernelnode
* is used.
*/
-
+
/*
* Implements cummunication-core :
*
@@ -53,7 +53,7 @@ int mdc800_io_sendCommand_with_retry (GPPort *port,unsigned char* command, unsig
{
int try=0;
int ret=GP_OK;
-
+
while (try < maxtries)
{
usleep(MDC800_DEFAULT_COMMAND_RETRY_DELAY*1000);
@@ -106,7 +106,7 @@ int mdc800_io_getCommandTimeout (unsigned char command)
case COMMAND_SET_CAMERA_MODE:
case COMMAND_DELETE_IMAGE:
return MDC800_LONG_TIMEOUT;
-
+
case COMMAND_TAKE_PICTURE:
case COMMAND_PLAYBACK_IMAGE:
case COMMAND_SET_PLAYBACK_MODE:
diff --git a/camlibs/mustek/mdc800_spec.h b/camlibs/mustek/mdc800_spec.h
index 16d325d0b..a999fc30e 100644
--- a/camlibs/mustek/mdc800_spec.h
+++ b/camlibs/mustek/mdc800_spec.h
@@ -19,7 +19,7 @@
/*
* Definition of Commands and useful structs.
*/
-
+
#ifndef DEFINE_MDC800_SPEC_H
#define DEFINE_MDC800_SPEC_H
diff --git a/camlibs/mustek/mustek-config.c b/camlibs/mustek/mustek-config.c
index 04ecdfd7d..dcf98f4b8 100644
--- a/camlibs/mustek/mustek-config.c
+++ b/camlibs/mustek/mustek-config.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999/2000 by
+ * Copyright 1999/2000 by
* Henning Zabel <henning@uni-paderborn.de>
*
* This program is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+
/*
- * gphoto driver for the Mustek MDC800 Digital Camera. The driver
+ * gphoto driver for the Mustek MDC800 Digital Camera. The driver
* supports rs232 and USB.
*/
@@ -57,23 +57,23 @@
struct ConfigValues {
GtkWidget *cam_id;
-
+
GtkWidget *image_quality;
-
+
GtkWidget *lcd;
GtkObject *lcd_adj;
-
+
GtkWidget *light;
GtkWidget *flash;
GtkWidget *lcd_on;
GtkWidget *source;
GtkWidget *exp_mode;
-
+
GtkWidget *baud;
-
+
GtkWidget *save_button, *cancel_button;
GtkWidget *dialog;
-
+
} mdc800_dialog;
@@ -96,11 +96,11 @@ GtkWidget* mdc800_createComboBox (char** content,int count)
{
int i=0;
GList* list=0;
-
+
GtkWidget* retval=gtk_combo_new ();
for (i=0; i<count; i++)
list=g_list_append (list, content [i] );
-
+
gtk_widget_show (retval);
gtk_combo_set_popdown_strings (GTK_COMBO (retval), list);
gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (retval)->entry),0);
@@ -108,7 +108,7 @@ GtkWidget* mdc800_createComboBox (char** content,int count)
}
-/*
+/*
* Sets up the item index in StringList list of
* ComboBox box
*/
@@ -152,21 +152,21 @@ void mdc800_createDialog (void )
spacer = gtk_vseparator_new();
gtk_widget_show(spacer);
- gtk_table_attach_defaults(GTK_TABLE(table),spacer,2,3,2,22);
-
+ gtk_table_attach_defaults(GTK_TABLE(table),spacer,2,3,2,22);
+
/* camera id ---------------------- */
label = gtk_label_new("Camera ID:");
gtk_widget_show(label);
mdc800_dialog.cam_id = gtk_label_new ("Mustek MDC800");
gtk_widget_show (mdc800_dialog.cam_id);
- gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,0,1);
+ gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,0,1);
gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.cam_id,1,2,0,1);
spacer = gtk_hseparator_new();
gtk_widget_show(spacer);
gtk_table_attach_defaults(GTK_TABLE(table),spacer,0,5,1,2);
-
+
/* image quality ---------------------- */
label = gtk_label_new("Image Quality:");
gtk_widget_show(label);
@@ -186,41 +186,41 @@ void mdc800_createDialog (void )
gtk_scale_set_draw_value(GTK_SCALE(mdc800_dialog.lcd), TRUE);
gtk_scale_set_digits(GTK_SCALE(mdc800_dialog.lcd), 0);
gtk_widget_show(mdc800_dialog.lcd);
- gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,6,7);
- gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.lcd,1,2,6,7);
+ gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,6,7);
+ gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.lcd,1,2,6,7);
/* flash mode ---------------------- */
label = gtk_label_new("Flash Mode:");
gtk_widget_show(label);
mdc800_dialog.flash=mdc800_createComboBox (mdc800_flash_light_string,5);
- gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,3,4);
+ gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,3,4);
gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.flash,1,2,3,4);
-
+
/* light source ---------------------- */
label = gtk_label_new("White Balance:");
gtk_widget_show(label);
mdc800_dialog.light=mdc800_createComboBox (mdc800_wb_string,4);
gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,4,5);
- gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.light,1,2,4,5);
+ gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.light,1,2,4,5);
+
-
/* Set exposure Mode ---------------------- */
label = gtk_label_new("Exposure Mode:");
gtk_widget_show(label);
mdc800_dialog.exp_mode=mdc800_createComboBox (mdc800_exposure_mode_string,2);
gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,5,6);
gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.exp_mode,1,2,5,6);
-
-
+
+
/* Storage Source ---------------------- */
label = gtk_label_new("Storage-Source:");
gtk_widget_show(label);
mdc800_dialog.source=mdc800_createComboBox (mdc800_storage_source_string,2);
gtk_table_attach_defaults(GTK_TABLE(table),label,3,4,2,3);
gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.source,4,5,2,3);
-
+
spacer = gtk_hseparator_new();
gtk_widget_show(spacer);
gtk_table_attach_defaults(GTK_TABLE(table),spacer,3,5,3,4);
@@ -230,15 +230,15 @@ void mdc800_createDialog (void )
/* Different Options */
label = gtk_label_new("Special Options:");
gtk_widget_show(label);
- gtk_table_attach_defaults(GTK_TABLE(table),label,3,4,4,5);
+ gtk_table_attach_defaults(GTK_TABLE(table),label,3,4,4,5);
/* LCD ON/OFF ---------------------- */
mdc800_dialog.lcd_on = gtk_check_button_new_with_label("Turn on LCD");
gtk_widget_show(mdc800_dialog.lcd_on);
gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.lcd_on,4,5,4,5);
-
-
+
+
spacer = gtk_hseparator_new();
gtk_widget_show(spacer);
gtk_table_attach_defaults(GTK_TABLE(table),spacer,3,5,7,8);
@@ -259,7 +259,7 @@ void mdc800_createDialog (void )
gtk_table_attach_defaults(GTK_TABLE(table),label,3,4,8,9);
gtk_table_attach_defaults(GTK_TABLE(table),mdc800_dialog.baud,4,5,8,9);
}
-
+
/* done with the widgets */
@@ -297,15 +297,15 @@ void mdc800_disposeDialog (void)
int mdc800_setupDialog (void)
{
int value, tmp;
-
+
if (!mdc800_initialize ())
{
return -1;
}
-
- update_status("Receiving Configuration.");
+
+ update_status("Receiving Configuration.");
update_progress (0);
-
+
/* Image Quality */
value=mdc800_getImageQuality ();
if (value<0)
@@ -318,7 +318,7 @@ int mdc800_setupDialog (void)
if (!mdc800_getWBandExposure (&tmp, &value))
return -1;
gtk_adjustment_set_value(GTK_ADJUSTMENT(mdc800_dialog.lcd_adj), tmp);
-
+
switch (value) {
case 1: value=0; break;
case 2: value=1; break;
@@ -355,17 +355,17 @@ int mdc800_setupDialog (void)
return -1;
mdc800_ComboBox_SetEntry (mdc800_dialog.exp_mode, mdc800_exposure_mode_string, value);
update_progress (95);
-
+
/* Baudrate */
if (!mdc800_io_using_usb) {
int speed;
mdc800_getSpeed(camera,&speed);
mdc800_ComboBox_SetEntry (mdc800_dialog.baud, mdc800_baud_rate_string, speed);
}
-
+
update_progress (100);
update_status("Done.");
-
+
update_progress (0);
return 0;
}
@@ -374,8 +374,8 @@ int mdc800_setupDialog (void)
int mdc800_setupConfig (void)
{
int value;
-
- update_status("Writing Configuration.");
+
+ update_status("Writing Configuration.");
update_progress (0);
@@ -386,8 +386,8 @@ int mdc800_setupConfig (void)
if (!mdc800_setImageQuality (value))
return -1;
update_progress (12);
-
-
+
+
/* set exposure setting */
value= GTK_ADJUSTMENT(mdc800_dialog.lcd_adj)->value;
if (!mdc800_setExposure (value))
@@ -423,7 +423,7 @@ int mdc800_setupConfig (void)
/* Set LCD ON/OFF... */
if (GTK_WIDGET_STATE(mdc800_dialog.lcd_on) == GTK_STATE_ACTIVE)
mdc800_enableLCD (1);
- else
+ else
mdc800_enableLCD (0);
update_progress(62);
@@ -432,7 +432,7 @@ int mdc800_setupConfig (void)
value = mdc800_ComboBox_GetEntry (mdc800_dialog.source, mdc800_storage_source_string,2);
if (value < 0)
return -1;
- update_progress(75);
+ update_progress(75);
if (!mdc800_setStorageSource (value))
@@ -450,8 +450,8 @@ int mdc800_setupConfig (void)
if (!mdc800_setExposureMode (value))
return -1;
update_progress (95);
-
-
+
+
/* Change BaudRate */
if (!mdc800_io_using_usb)
{
@@ -460,7 +460,7 @@ int mdc800_setupConfig (void)
return -1;
mdc800_changespeed (value);
}
-
+
update_progress(100);
update_status("Done.");
diff --git a/camlibs/mustek/print.h b/camlibs/mustek/print.h
index 4b8c805bd..4a716e677 100644
--- a/camlibs/mustek/print.h
+++ b/camlibs/mustek/print.h
@@ -25,7 +25,7 @@
#include <stdio.h>
/* Message or Errors from the gphoto API */
-#define printAPINote if (1) printf
+#define printAPINote if (1) printf
#define printAPIError if (1) printf
/* only for debugging : The FunktionCall */
diff --git a/camlibs/mustek/usb.c b/camlibs/mustek/usb.c
index d9abb3021..85ed9ea7b 100644
--- a/camlibs/mustek/usb.c
+++ b/camlibs/mustek/usb.c
@@ -15,10 +15,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+
/*
- * gphoto driver for the Mustek MDC800 Digital Camera. The driver
- * supports rs232 and USB.
+ * gphoto driver for the Mustek MDC800 Digital Camera. The driver
+ * supports rs232 and USB.
*/
#define _DEFAULT_SOURCE
@@ -67,7 +67,7 @@ static int mdc800_usb_isReady (unsigned char *ch)
/*
- * Waits for the camera
+ * Waits for the camera
* type: 0: Wait until the camera gets ready
* 1: Read data from irq
* The function stores the readen 8 Bytes in data.
@@ -134,7 +134,7 @@ int mdc800_usb_sendCommand(GPPort*port,unsigned char*command,unsigned char*buffe
GPPortSettings settings;
int ret;
- printf ("(mdc800_usb_sendCommand) id:%i (%i,%i,%i,%i,%i,%i),answer:%i\n",command[1],command[2],command[3],command[4],command[5],command[6],command[7],length);
+ printf ("(mdc800_usb_sendCommand) id:%i (%i,%i,%i,%i,%i,%i),answer:%i\n",command[1],command[2],command[3],command[4],command[5],command[6],command[7],length);
/* Send the Command */
gp_port_set_timeout(port,MDC800_DEFAULT_TIMEOUT);
@@ -146,7 +146,7 @@ int mdc800_usb_sendCommand(GPPort*port,unsigned char*command,unsigned char*buffe
if (ret != GP_OK) {
fprintf(stderr,"Camera did not get ready before mdc800_usb_sendCommand!\n");
}
-
+
if ((ret=gp_port_write(port,(char*)command,8)) != 8)
{
printCError ("(mdc800_usb_sendCommand) sending Command fails (%d)!\n",ret);
diff --git a/camlibs/panasonic/coolshot/coolshot.c b/camlibs/panasonic/coolshot/coolshot.c
index e14c18216..a662ce04f 100644
--- a/camlibs/panasonic/coolshot/coolshot.c
+++ b/camlibs/panasonic/coolshot/coolshot.c
@@ -202,7 +202,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
}
/*
- * Get the file number from the CameraFileSystem (and increment
+ * Get the file number from the CameraFileSystem (and increment
* because we need numbers starting with 1)
*/
CHECK (n = gp_filesystem_number (camera->fs, folder, filename,
diff --git a/camlibs/panasonic/coolshot/library.c b/camlibs/panasonic/coolshot/library.c
index 17cebf408..3ce3ce394 100644
--- a/camlibs/panasonic/coolshot/library.c
+++ b/camlibs/panasonic/coolshot/library.c
@@ -398,7 +398,7 @@ int coolshot_download_image( Camera *camera, CameraFile *file,
last_good = 0;
}
- id = gp_context_progress_start (context, thumbnail ? 1800 : 80000,
+ id = gp_context_progress_start (context, thumbnail ? 1800 : 80000,
_("Downloading image..."));
while( strncmp( packet + 2, "DT", 2 ) == 0 ) {
/* process packet */
diff --git a/camlibs/panasonic/dc.c b/camlibs/panasonic/dc.c
index a1ffb99ea..a9a222a40 100644
--- a/camlibs/panasonic/dc.c
+++ b/camlibs/panasonic/dc.c
@@ -85,7 +85,7 @@ int dsc1_retrcmd(Camera *camera) {
if (0 < s)
dsc_dumpmem(camera->pl->buf, s);
*/
-
+
if (s != 17 || memcmp(camera->pl->buf, r_prefix, 12) != 0 )
RETURN_ERROR(EDSCBADRSP)
/* bad response */
diff --git a/camlibs/panasonic/dc.h b/camlibs/panasonic/dc.h
index 635430704..a921a10c5 100644
--- a/camlibs/panasonic/dc.h
+++ b/camlibs/panasonic/dc.h
@@ -9,16 +9,16 @@
and distributed under the terms of the gPhoto project license, COPYING.
By continuing to use, modify, or distribute this file you indicate that
you have read the license, understand and accept it fully.
-
+
THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE
LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
Note:
-
+
This header contains common typedefs, constants and utility functions
for Panasonic DC1000 and DC1580 cameras.
-*/
+*/
#include <stdio.h>
#include <errno.h>
@@ -34,7 +34,7 @@ typedef enum {
fine = 1,
superfine = 2
} dsc_quality_t;
-
+
struct _CameraPrivateLibrary {
char *buf;
int size;
@@ -48,7 +48,7 @@ struct _CameraPrivateLibrary {
#define DSC_PAUSE 4 /* seconds to wait for camera to redraw screen */
-#define DSC_FULLIMAGE 0
+#define DSC_FULLIMAGE 0
#define DSC_THUMBNAIL 1
#define EDSCSERRNO -1 /* see errno value */
@@ -69,14 +69,14 @@ int dsc1_retrcmd(Camera *camera);
int dsc1_setbaudrate(Camera *camera, int speed);
/* Set baud rate of connection. Part of hand shake procedure */
/* Returns GP_OK if successful and GP_ERROR otherwise. */
-
+
int dsc1_getmodel(Camera *camera);
/* Returns camera (sub)model, DSC1: DC1000, DSC2: DC1580, */
/* 0: unknown, or GP_ERROR. Part of hand shake procedure. */
void dsc_dumpmem(void *buf, int size);
/* Print size bytes of memory at the buf pointer. */
-
+
const char *dsc_strerror(int error);
/* Convert error numbers into readable messages. */
@@ -104,7 +104,7 @@ void dsc_errorprint(int error, char *file, int line);
dsc_errorprint(ERROR, __FILE__, __LINE__); \
return GP_ERROR; \
}
-
+
#define CHECK(OPERATION) \
if ((result = OPERATION) < 0) { \
dsc_errorprint(EDSCSERRNO, __FILE__, __LINE__); \
diff --git a/camlibs/panasonic/dc1000.c b/camlibs/panasonic/dc1000.c
index 91b1383ac..8360d746c 100644
--- a/camlibs/panasonic/dc1000.c
+++ b/camlibs/panasonic/dc1000.c
@@ -7,17 +7,17 @@
and distributed under the terms of the gPhoto project license, COPYING.
By continuing to use, modify, or distribute this file you indicate that
you have read the license, understand and accept it fully.
-
+
THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE
LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
Note:
-
+
This is a Panasonic PV/NV-DC1000 camera gPhoto library source code.
-
-*/
-
+
+*/
+
#include "config.h"
#include <stdlib.h>
@@ -58,77 +58,77 @@
/* dsc1_connect - try hand shake with camera and establish connection */
static int dsc1_connect(Camera *camera, int speed) {
-
+
uint8_t data = 0;
-
+
DEBUG_PRINT_MEDIUM(("Connecting a camera."));
-
+
if (dsc1_setbaudrate(camera, speed) != GP_OK)
return GP_ERROR;
-
+
if (dsc1_getmodel(camera) != DSC1)
RETURN_ERROR(EDSCBADDSC);
/* bad camera model */
-
+
dsc1_sendcmd(camera, DSC1_CMD_CONNECT, &data, 1);
-
- if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
+
+ if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
DEBUG_PRINT_MEDIUM(("Camera connected successfully."));
-
- return GP_OK;
+
+ return GP_OK;
}
/* dsc1_disconnect - reset camera, free buffers and close files */
static int dsc1_disconnect(Camera *camera) {
-
+
DEBUG_PRINT_MEDIUM(("Disconnecting the camera."));
-
+
if (dsc1_sendcmd(camera, DSC1_CMD_RESET, NULL, 0) != GP_OK)
return GP_ERROR;
-
- if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
+
+ if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
RETURN_ERROR(EDSCBADRSP)
- /* bad response */
- else
+ /* bad response */
+ else
sleep(DSC_PAUSE); /* let camera to redraw its screen */
-
+
DEBUG_PRINT_MEDIUM(("Camera disconnected."));
-
+
return GP_OK;
}
/* dsc1_getindex - retrieve the number of images stored in camera memory */
static int dsc1_getindex(Camera *camera) {
-
+
int result = GP_ERROR;
DEBUG_PRINT_MEDIUM(("Retrieving the number of images."));
-
+
if (dsc1_sendcmd(camera, DSC1_CMD_GET_INDEX, NULL, 0) != GP_OK)
return GP_ERROR;
-
+
if (dsc1_retrcmd(camera) == DSC1_RSP_INDEX)
result = camera->pl->size / 2;
else
RETURN_ERROR(EDSCBADRSP);
/* bad response */
-
+
DEBUG_PRINT_MEDIUM(("Number of images: %i", result));
-
+
return result;
}
/* dsc1_delete - delete image #index from camera memory */
static int dsc1_delete(Camera *camera, uint8_t index) {
-
+
DEBUG_PRINT_MEDIUM(("Deleting image: %i.", index));
-
+
if (index < 1)
RETURN_ERROR(EDSCBADNUM);
/* bad image number */
@@ -143,16 +143,16 @@ static int dsc1_delete(Camera *camera, uint8_t index) {
DEBUG_PRINT_MEDIUM(("Image: %i deleted.", index));
return GP_OK;
-}
-
+}
+
/* dsc1_selectimage - select image to download, return its size */
static int dsc1_selectimage(Camera *camera, uint8_t index)
{
int size = 0;
-
- DEBUG_PRINT_MEDIUM(("Selecting image: %i.", index));
-
+
+ DEBUG_PRINT_MEDIUM(("Selecting image: %i.", index));
+
if (index < 1)
RETURN_ERROR(EDSCBADNUM);
/* bad image number */
@@ -163,7 +163,7 @@ static int dsc1_selectimage(Camera *camera, uint8_t index)
if (dsc1_retrcmd(camera) != DSC1_RSP_IMGSIZE)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
-
+
if (camera->pl->size != 4)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
@@ -171,8 +171,8 @@ static int dsc1_selectimage(Camera *camera, uint8_t index)
size = (uint32_t)camera->pl->buf[3] |
((uint8_t)camera->pl->buf[2] << 8) |
((uint8_t)camera->pl->buf[1] << 16) |
- ((uint8_t)camera->pl->buf[0] << 24);
-
+ ((uint8_t)camera->pl->buf[0] << 24);
+
DEBUG_PRINT_MEDIUM(("Selected image: %i, size: %i.", index, size));
return size;
@@ -181,26 +181,26 @@ static int dsc1_selectimage(Camera *camera, uint8_t index)
/* gp_port_readimageblock - read #block block (1024 bytes) of an image into buf */
static int dsc1_readimageblock(Camera *camera, int block, char *buffer) {
-
+
char buf[2];
-
+
DEBUG_PRINT_MEDIUM(("Reading image block: %i.", block));
buf[0] = (uint8_t)(block >> 8);
buf[1] = (uint8_t)block;
-
+
if (dsc1_sendcmd(camera, DSC1_CMD_GET_DATA, buf, 2) != GP_OK)
return GP_ERROR;
-
+
if (dsc1_retrcmd(camera) != DSC1_RSP_DATA)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
if (buffer)
memcpy(buffer, camera->pl->buf, camera->pl->size);
-
+
DEBUG_PRINT_MEDIUM(("Block: %i read in.", block));
-
+
return camera->pl->size;
}
@@ -212,15 +212,15 @@ static char *dsc1_readimage(Camera *camera, int index, int *size) {
char *buffer = NULL;
DEBUG_PRINT_MEDIUM(("Reading image: %i.", index));
-
+
if ((*size = dsc1_selectimage(camera, index)) < 0)
return NULL;
-
+
if (!(buffer = (char*)malloc(*size))) {
DEBUG_PRINT_MEDIUM(("Failed to allocate memory for image data."));
return NULL;
}
-
+
for (i = 0, s = 0; s < *size; i++) {
if ((rsize = dsc1_readimageblock(camera, i, &buffer[s])) == GP_ERROR) {
DEBUG_PRINT_MEDIUM(("Error during image transfer."));
@@ -231,7 +231,7 @@ static char *dsc1_readimage(Camera *camera, int index, int *size) {
}
DEBUG_PRINT_MEDIUM(("Image: %i read in.", index));
-
+
return buffer;
}
#endif
@@ -239,11 +239,11 @@ static char *dsc1_readimage(Camera *camera, int index, int *size) {
/* dsc1_setimageres - set image resolution based on its size, used on upload to camera */
static int dsc1_setimageres(Camera *camera, int size) {
-
+
dsc_quality_t res;
-
- DEBUG_PRINT_MEDIUM(("Setting image resolution, image size: %i.", size));
-
+
+ DEBUG_PRINT_MEDIUM(("Setting image resolution, image size: %i.", size));
+
if (size < 65536)
res = normal;
else if (size < 196608)
@@ -257,7 +257,7 @@ static int dsc1_setimageres(Camera *camera, int size) {
if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
-
+
DEBUG_PRINT_MEDIUM(("Image resolution set to: %i", res));
return GP_OK;
@@ -274,9 +274,9 @@ static int dsc1_writeimageblock(Camera *camera, int block, char *buffer, int siz
if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
-
+
DEBUG_PRINT_MEDIUM(("Block: %i of size: %i written.", block, size));
-
+
return GP_OK;
}
@@ -287,24 +287,24 @@ static int dsc1_writeimage(Camera *camera, char *buffer, int size)
int blocks, blocksize, i;
DEBUG_PRINT_MEDIUM(("Writing an image of size: %i.", size));
-
+
if ((dsc1_setimageres(camera, size)) != GP_OK)
return GP_ERROR;
-
+
blocks = (size - 1)/DSC_BLOCKSIZE + 1;
-
+
for (i = 0; i < blocks; i++) {
blocksize = size - i*DSC_BLOCKSIZE;
- if (DSC_BLOCKSIZE < blocksize)
+ if (DSC_BLOCKSIZE < blocksize)
blocksize = DSC_BLOCKSIZE;
if (dsc1_writeimageblock(camera, i, &buffer[i*DSC_BLOCKSIZE], blocksize) != GP_OK) {
DEBUG_PRINT_MEDIUM(("Error during image transfer."));
return GP_ERROR;
}
}
-
+
DEBUG_PRINT_MEDIUM(("Image written successfully."));
-
+
return GP_OK;
}
#endif
@@ -320,11 +320,11 @@ static int dsc1_preview(Camera *camera, int index)
if (dsc1_sendcmd(camera, DSC1_CMD_PREVIEW, &index, 1) != GP_OK)
return GP_ERROR;
-
+
if (dsc1_retrcmd(camera) != DSC1_RSP_OK)
RETURN_ERROR(EDSCBADRSP);
/* bad response */
-
+
return GP_OK;
}
#endif
@@ -352,9 +352,9 @@ int camera_abilities (CameraAbilitiesList *list) {
a.speed[0] = 9600;
a.speed[1] = 19200;
a.speed[2] = 38400;
- a.speed[3] = 57600;
- a.speed[4] = 115200;
- a.speed[5] = 0;
+ a.speed[3] = 57600;
+ a.speed[4] = 115200;
+ a.speed[5] = 0;
a.operations = GP_OPERATION_NONE;
a.file_operations = GP_FILE_OPERATION_DELETE;
a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE;
@@ -379,14 +379,14 @@ static int camera_exit (Camera *camera, GPContext *context) {
}
static int file_list_func (CameraFilesystem *fs, const char *folder,
- CameraList *list, void *data, GPContext *context)
+ CameraList *list, void *data, GPContext *context)
{
Camera *camera = data;
int count;
-
+
if ((count = dsc1_getindex (camera)) == GP_ERROR)
return GP_ERROR;
-
+
gp_list_populate (list, DSC_FILENAMEFMT, count);
return GP_OK;
@@ -394,7 +394,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
- CameraFile *file, void *data, GPContext *context)
+ CameraFile *file, void *data, GPContext *context)
{
Camera *camera = data;
int index, size, rsize, i, s;
@@ -407,17 +407,17 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
/* index is the 0-based image number on the camera */
index = gp_filesystem_number (camera->fs, folder, filename, context);
- if (index < 0)
+ if (index < 0)
return (index);
if ((size = dsc1_selectimage(camera, index + 1)) < 0)
return (GP_ERROR);
-
+
gp_file_set_mime_type (file, GP_MIME_JPEG);
id = gp_context_progress_start (context, size, _("Getting data..."));
for (i = 0, s = 0; s < size; i++) {
- if ((rsize = dsc1_readimageblock(camera, i, NULL)) == GP_ERROR)
+ if ((rsize = dsc1_readimageblock(camera, i, NULL)) == GP_ERROR)
return GP_ERROR;
s += rsize;
gp_file_append (file, camera->pl->buf, camera->pl->size);
@@ -426,13 +426,13 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
return (GP_ERROR_CANCEL);
}
gp_context_progress_stop (context, id);
-
+
return GP_OK;
}
static int put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
CameraFileType type, CameraFile *file, void *user_data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = user_data;
int blocks, blocksize, i;
@@ -440,38 +440,38 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
const char *data;
unsigned long int size;
unsigned int id;
-
- gp_context_status(context, _("Uploading image: %s."), name);
-
+
+ gp_context_status(context, _("Uploading image: %s."), name);
+
/* We can not figure out file type, at least by now.
if (strcmp(file->type, "image/jpg") != 0) {
dsc_print_message(camera, "JPEG image format allowed only.");
- return GP_ERROR;
+ return GP_ERROR;
}
-*/
+*/
gp_file_get_data_and_size (file, &data, &size);
if (size > DSC_MAXIMAGESIZE) {
gp_context_message (context, _("File size is %ld bytes. "
"The size of the largest file possible to "
- "upload is: %i bytes."), size,
+ "upload is: %i bytes."), size,
DSC_MAXIMAGESIZE);
- return GP_ERROR;
+ return GP_ERROR;
}
result = dsc1_setimageres (camera, size);
if (result != GP_OK)
return (result);
-
+
blocks = (size - 1)/DSC_BLOCKSIZE + 1;
id = gp_context_progress_start (context, blocks, _("Uploading..."));
for (i = 0; i < blocks; i++) {
blocksize = size - i*DSC_BLOCKSIZE;
- if (DSC_BLOCKSIZE < blocksize)
+ if (DSC_BLOCKSIZE < blocksize)
blocksize = DSC_BLOCKSIZE;
- result = dsc1_writeimageblock (camera, i,
- (char*)&data[i*DSC_BLOCKSIZE],
+ result = dsc1_writeimageblock (camera, i,
+ (char*)&data[i*DSC_BLOCKSIZE],
blocksize);
if (result != GP_OK)
return (result);
@@ -487,7 +487,7 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
static int delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = data;
int index, result;
@@ -502,7 +502,7 @@ static int delete_file_func (CameraFilesystem *fs, const char *folder,
return dsc1_delete(camera, index);
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
strcpy(about->text,
_("Panasonic DC1000 gPhoto library\n"
diff --git a/camlibs/panasonic/dc1000.h b/camlibs/panasonic/dc1000.h
index 5855e8ca4..897af4800 100644
--- a/camlibs/panasonic/dc1000.h
+++ b/camlibs/panasonic/dc1000.h
@@ -9,15 +9,15 @@
and distributed under the terms of the gPhoto project license, COPYING.
By continuing to use, modify, or distribute this file you indicate that
you have read the license, understand and accept it fully.
-
+
THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE
LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
Note:
-
+
This is a Panasonic DC1000 camera gPhoto library header file.
-*/
+*/
/* DC1000 command codes */
diff --git a/camlibs/panasonic/dc1580.c b/camlibs/panasonic/dc1580.c
index 0db1db399..d7df2f903 100644
--- a/camlibs/panasonic/dc1580.c
+++ b/camlibs/panasonic/dc1580.c
@@ -98,7 +98,7 @@ static int dsc2_sendcmd(Camera *camera, uint8_t cmd, long int data, uint8_t sequ
/* dsc2_retrcmd - retrieve command and its data from DSC */
static int dsc2_retrcmd(Camera *camera) {
-
+
int result = GP_ERROR;
int s;
@@ -126,7 +126,7 @@ static int dsc2_retrcmd(Camera *camera) {
/* dsc2_connect - try hand shake with camera and establish connection */
static int dsc2_connect(Camera *camera, int speed) {
-
+
DEBUG_PRINT_MEDIUM(("Connecting camera with speed: %i.", speed));
if (dsc1_setbaudrate(camera, speed) != GP_OK)
@@ -151,7 +151,7 @@ static int dsc2_connect(Camera *camera, int speed) {
/* dsc2_disconnect - reset camera, free buffers and close files */
static int dsc2_disconnect(Camera *camera) {
-
+
DEBUG_PRINT_MEDIUM(("Disconnecting the camera."));
if (dsc2_sendcmd(camera, DSC2_CMD_RESET, 0, 0) != GP_OK)
@@ -171,7 +171,7 @@ static int dsc2_disconnect(Camera *camera) {
/* dsc2_getindex - retrieve the number of images stored in camera memory */
static int dsc2_getindex(Camera *camera) {
-
+
int result = GP_ERROR;
DEBUG_PRINT_MEDIUM(("Retrieving the number of images."));
@@ -197,7 +197,7 @@ static int dsc2_getindex(Camera *camera) {
/* dsc2_delete - delete image #index from camera memory */
static int dsc2_delete(Camera *camera, int index) {
-
+
DEBUG_PRINT_MEDIUM(("Deleting image: %i.", index));
if (index < 1)
@@ -218,7 +218,7 @@ static int dsc2_delete(Camera *camera, int index) {
/* dsc2_selectimage - select image to download, return its size */
static int dsc2_selectimage(Camera *camera, int index, int thumbnail) {
-
+
int size = 0;
DEBUG_PRINT_MEDIUM(("Selecting image: %i, thumbnail: %i.", index, thumbnail));
@@ -252,7 +252,7 @@ static int dsc2_selectimage(Camera *camera, int index, int thumbnail) {
/* gp_port_readimageblock - read #block block (1024 bytes) of an image into buf */
static int dsc2_readimageblock(Camera *camera, int block, char *buffer) {
-
+
DEBUG_PRINT_MEDIUM(("Reading image block: %i.", block));
if (dsc2_sendcmd(camera, DSC2_CMD_GET_DATA, block, block) != GP_OK)
@@ -372,7 +372,7 @@ static int dsc2_writeimageblock(Camera *camera, int block, char *buffer, int siz
#if 0
static int dsc2_writeimage(Camera *camera, char *buffer, int size) {
-
+
int blocks, blocksize, i;
DEBUG_PRINT_MEDIUM(("Writing an image of size: %i.", size));
@@ -402,7 +402,7 @@ static int dsc2_writeimage(Camera *camera, char *buffer, int size) {
#if 0
static int dsc2_preview(Camera *camera, int index) {
-
+
if (index < 1)
RETURN_ERROR(EDSCBADNUM);
/* bad image number */
@@ -423,21 +423,21 @@ static int dsc2_preview(Camera *camera, int index) {
/* Library interface functions */
int camera_id (CameraText *id) {
-
+
strcpy(id->text, "panasonic-dc1580");
return (GP_OK);
}
int camera_abilities (CameraAbilitiesList *list) {
-
+
CameraAbilities a;
char *models[] = {
"Panasonic:DC1580",
"Nikon:CoolPix 600",
NULL };
int i = 0, result;
-
+
while (models[i]) {
memset(&a, 0, sizeof(a));
a.status = GP_DRIVER_STATUS_PRODUCTION;
@@ -450,7 +450,7 @@ int camera_abilities (CameraAbilitiesList *list) {
a.speed[4] = 115200;
a.speed[5] = 0;
a.operations = GP_OPERATION_NONE;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE;
@@ -478,9 +478,9 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
Camera *camera = data;
int count, result;
-
+
CHECK (count = dsc2_getindex(camera));
-
+
CHECK (gp_list_populate(list, DSC_FILENAMEFMT, count));
return GP_OK;
@@ -555,7 +555,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
static int put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
CameraFileType type, CameraFile *file, void *user_data,
GPContext *context) {
-
+
Camera *camera = user_data;
int blocks, blocksize, i, result;
const char *data;
@@ -575,7 +575,7 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
if (size > DSC_MAXIMAGESIZE) {
gp_context_message (context, _("File size is %ld bytes. "
"The size of the largest file possible to "
- "upload is: %i bytes."), size,
+ "upload is: %i bytes."), size,
DSC_MAXIMAGESIZE);
return GP_ERROR;
}
@@ -589,8 +589,8 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
blocksize = size - i*DSC_BLOCKSIZE;
if (DSC_BLOCKSIZE < blocksize)
blocksize = DSC_BLOCKSIZE;
- result = dsc2_writeimageblock(camera, i,
- (char*)&data[i*DSC_BLOCKSIZE],
+ result = dsc2_writeimageblock(camera, i,
+ (char*)&data[i*DSC_BLOCKSIZE],
blocksize);
if (result != GP_OK)
return result;
@@ -606,7 +606,7 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
static int delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data,
GPContext *context) {
-
+
Camera *camera = data;
int index, result;
@@ -619,7 +619,7 @@ static int delete_file_func (CameraFilesystem *fs, const char *folder,
return dsc2_delete(camera, index);
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
strcpy(about->text,
_("Panasonic DC1580 gPhoto2 library\n"
@@ -638,7 +638,7 @@ static CameraFilesystemFuncs fsfuncs = {
.del_file_func = delete_file_func,
};
-int camera_init (Camera *camera, GPContext *context)
+int camera_init (Camera *camera, GPContext *context)
{
GPPortSettings settings;
int result, selected_speed;
diff --git a/camlibs/panasonic/dc1580.h b/camlibs/panasonic/dc1580.h
index 7681a7442..da3b80cb6 100644
--- a/camlibs/panasonic/dc1580.h
+++ b/camlibs/panasonic/dc1580.h
@@ -9,15 +9,15 @@
and distributed under the terms of the gPhoto project license, COPYING.
By continuing to use, modify, or distribute this file you indicate that
you have read the license, understand and accept it fully.
-
+
THIS SOFTWARE IS PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE COPYRIGHT HOLDER BE
LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE.
Note:
-
+
This is a Panasonic DC1580 camera gPhoto library header file.
-*/
+*/
/* DC1580 command codes */
diff --git a/camlibs/panasonic/l859/l859.c b/camlibs/panasonic/l859/l859.c
index 67a1cdd9d..855975b9e 100644
--- a/camlibs/panasonic/l859/l859.c
+++ b/camlibs/panasonic/l859/l859.c
@@ -527,7 +527,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
}
}
- gp_file_set_mime_type (file, GP_MIME_JPEG);
+ gp_file_set_mime_type (file, GP_MIME_JPEG);
GP_DEBUG ("Camera Get File Done");
return (GP_OK);
}
diff --git a/camlibs/pccam300/library.c b/camlibs/pccam300/library.c
index 25167f06b..b48607c87 100644
--- a/camlibs/pccam300/library.c
+++ b/camlibs/pccam300/library.c
@@ -116,11 +116,11 @@ file_list_func (CameraFilesystem *fs, const char *folder,
id = gp_context_progress_start (context, filecount,
_("Getting file list..."));
-
+
for (i = 0; i < filecount; i++) {
/* Get information */
gp_file_new (&file);
-
+
ret = pccam300_get_file (camera->port, context, i,
&buffer, &size, &type);
if (ret < GP_OK) {
@@ -155,10 +155,10 @@ file_list_func (CameraFilesystem *fs, const char *folder,
gp_file_set_data_and_size (file, (char *)buffer, size);
else
free (buffer);
-
+
/*
* Append directly to the filesystem instead of to the list,
- * because we have additional information.
+ * because we have additional information.
* */
gp_filesystem_append (camera->fs, folder, fn, context);
gp_filesystem_set_info_noop (camera->fs, folder, fn, info, context);
diff --git a/camlibs/pccam300/pccam300.c b/camlibs/pccam300/pccam300.c
index 014b2e2d8..25ad889ca 100644
--- a/camlibs/pccam300/pccam300.c
+++ b/camlibs/pccam300/pccam300.c
@@ -52,7 +52,7 @@
#endif
/*
- * waits until the status value is 0 or 8.
+ * waits until the status value is 0 or 8.
* if status == 0xb0 or 0x40 we will wait some more
*/
static int
@@ -161,7 +161,7 @@ pccam300_get_file (GPPort *port, GPContext *context, int index,
* download of the file. */
CHECK (pccam300_get_filesize (port, index, &data_size));
CHECK (pccam300_get_filesize (port, index, &data_size));
-
+
/* The jpeg header we will download after the data itself is 623
* bytes long. The first 0x200 bytes of the data appear to be
* garbage, they are overwritten by the header. */
diff --git a/camlibs/pccam300/pccam300.h b/camlibs/pccam300/pccam300.h
index b0e88f2c0..7f73c9f77 100644
--- a/camlibs/pccam300/pccam300.h
+++ b/camlibs/pccam300/pccam300.h
@@ -38,7 +38,7 @@ int pccam300_get_file_list (GPPort *port, GPContext *context);
int pccam300_delete_file (GPPort *port, GPContext *context, int index);
int pccam300_delete_all (GPPort *port, GPContext *context);
int pccam300_get_file (GPPort *port, GPContext *context, int index,
- unsigned char **data, unsigned int *size,
+ unsigned char **data, unsigned int *size,
unsigned int *type);
int pccam300_get_mem_info (GPPort *port, GPContext *context, int *totalmem,
int *freemem);
diff --git a/camlibs/pccam600/library.c b/camlibs/pccam600/library.c
index 286dc6d7f..fe01597a4 100644
--- a/camlibs/pccam600/library.c
+++ b/camlibs/pccam600/library.c
@@ -79,7 +79,7 @@ int camera_id(CameraText *id)
}
int camera_abilities(CameraAbilitiesList *list)
-{
+{
int i;
CameraAbilities a;
for(i=0; models[i].name; i++) {
@@ -92,19 +92,19 @@ int camera_abilities(CameraAbilitiesList *list)
a.usb_product = models[i].idProduct;
a.operations = GP_OPERATION_NONE;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
- a.file_operations = GP_FILE_OPERATION_DELETE;
+ a.file_operations = GP_FILE_OPERATION_DELETE;
gp_abilities_list_append(list, a);
}
return GP_OK;
}
-
-static int camera_exit(Camera *camera, GPContext *context){
+
+static int camera_exit(Camera *camera, GPContext *context){
return pccam600_close(camera->port, context);
}
static int file_list_func (CameraFilesystem *fs, const char *folder,
CameraList *list, void *data, GPContext *context){
-
+
Camera *camera = data;
CameraFileInfo info;
int n,i,nr_of_blocks;
@@ -127,7 +127,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
memcpy(file_entry,&(buffer)[i],32);
file_entry->name[8] = 0;
/*Fileentry valid? */
- if( !((file_entry->state & 0x02) != 2) &&
+ if( !((file_entry->state & 0x02) != 2) &&
!((file_entry->state & 0x08) == 8) )
{
info.file.fields = 0;
@@ -166,7 +166,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
info.file.size = (file_entry->size[1]*256+
file_entry->size[0]) * 256;
info.file.permissions = GP_FILE_PERM_READ | GP_FILE_PERM_DELETE;
- info.file.fields |= GP_FILE_INFO_SIZE | GP_FILE_INFO_PERMISSIONS
+ info.file.fields |= GP_FILE_INFO_SIZE | GP_FILE_INFO_PERMISSIONS
|GP_FILE_INFO_TYPE;
CHECK(gp_filesystem_set_info_noop(fs, folder, (char *)file_entry->name, info, context));
}
@@ -176,16 +176,16 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
return GP_OK;
}
-static int camera_get_file (Camera *camera, GPContext *context, int index,
- unsigned char **data, int *size)
+static int camera_get_file (Camera *camera, GPContext *context, int index,
+ unsigned char **data, int *size)
{
unsigned char buffer[512];
int nr_of_blocks = 0;
int n,id,canceled=0;
int picturebuffersize = 0;
- int offset = 0;
+ int offset = 0;
nr_of_blocks = pccam600_get_file(camera->port,context,index);
- if (nr_of_blocks < 0)
+ if (nr_of_blocks < 0)
return GP_ERROR_FILE_NOT_FOUND;
picturebuffersize = nr_of_blocks * 512;
id = gp_context_progress_start(context,nr_of_blocks,_("Downloading file..."));
@@ -210,7 +210,7 @@ static int camera_get_file (Camera *camera, GPContext *context, int index,
static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
- CameraFile *file, void *user_data,
+ CameraFile *file, void *user_data,
GPContext *context)
{
Camera *camera = user_data;
@@ -235,7 +235,7 @@ static int camera_summary(Camera *camera, CameraText *summary, GPContext *contex
{
int totalmem;
int freemem;
- char summary_text[256];
+ char summary_text[256];
CHECK(pccam600_get_mem_info(camera->port,context,&totalmem,&freemem));
snprintf(summary_text,sizeof(summary_text),
(" Total memory is %8d bytes.\n Free memory is %8d bytes."),
@@ -246,7 +246,7 @@ static int camera_summary(Camera *camera, CameraText *summary, GPContext *contex
static int camera_about(Camera *camera, CameraText *about, GPContext *context)
{
- strcpy(about->text,
+ strcpy(about->text,
_("Creative PC-CAM600\nAuthor: Peter Kajberg <pbk@odense.kollegienet.dk>\n"));
return GP_OK;
}
@@ -274,7 +274,7 @@ int camera_init(Camera *camera, GPContext *context){
camera->functions->summary = camera_summary;
camera->functions->about = camera_about;
gp_log (GP_LOG_DEBUG, "pccam", "Initializing the camera\n");
- switch (camera->port->type)
+ switch (camera->port->type)
{
case GP_PORT_USB:
CHECK(gp_port_get_settings(camera->port,&settings));
@@ -287,9 +287,9 @@ int camera_init(Camera *camera, GPContext *context){
break;
case GP_PORT_SERIAL:
return GP_ERROR_IO_SUPPORTED_SERIAL;
- default:
+ default:
return GP_ERROR_NOT_SUPPORTED;
- }
+ }
CHECK(pccam600_init(camera->port, context));
return gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera);
}
diff --git a/camlibs/pccam600/pccam600.c b/camlibs/pccam600/pccam600.c
index 48d955b22..2f60e6056 100644
--- a/camlibs/pccam600/pccam600.c
+++ b/camlibs/pccam600/pccam600.c
@@ -53,7 +53,7 @@
#endif
/*
- *waits until the status value is 0 or 8.
+ *waits until the status value is 0 or 8.
*if status == 0xb0 or 0x40 we will wait some more
*/
static int pccam600_wait_for_status(GPPort *port){
@@ -92,12 +92,12 @@ int pccam600_delete_file(GPPort *port, GPContext *context, int index){
return GP_OK;
}
-int pccam600_get_mem_info(GPPort *port, GPContext *context, int *totalmem,
+int pccam600_get_mem_info(GPPort *port, GPContext *context, int *totalmem,
int *freemem)
{
unsigned char response[4];
gp_port_set_timeout(port, 400000);
- CHECK(gp_port_usb_msg_read(port,0x60,0x00,0x03,(char*)response,0x04));
+ CHECK(gp_port_usb_msg_read(port,0x60,0x00,0x03,(char*)response,0x04));
*totalmem = response[2]*65536+response[1]*256+response[0];
CHECK(pccam600_wait_for_status(port));
CHECK(gp_port_usb_msg_read(port,0x60,0x00,0x04,(char*)response,0x04));
@@ -124,7 +124,7 @@ int pccam600_get_file_list(GPPort *port, GPContext *context){
gp_log(GP_LOG_DEBUG,"pccam600 library: pccam600_get_file_list",
"nr_of_blocks is 0");
gp_context_error(context,_("pccam600_init: Expected > %d blocks got %d"),
- 0,nr_of_blocks);
+ 0,nr_of_blocks);
return GP_ERROR;
}
return nr_of_blocks / 2;
@@ -153,7 +153,7 @@ int pccam600_get_file(GPPort *port, GPContext *context, int index){
gp_log(GP_LOG_DEBUG,
"pccam600 library: pccam600_get_file","nr_of_msg is 0");
gp_context_error(context,_("pccam600_init: Expected > %d blocks got %d"),
- 0,nr_of_blocks);
+ 0,nr_of_blocks);
return GP_ERROR;
}
return nr_of_blocks / 2;
@@ -209,14 +209,14 @@ int pccam600_init(GPPort *port, GPContext *context){
nr_of_blocks = response[2]*256+response[1];
if (nr_of_blocks == 0) {
- gp_context_error(context,_("pccam600_init: Expected %d blocks got %d"),64,nr_of_blocks);
+ gp_context_error(context,_("pccam600_init: Expected %d blocks got %d"),64,nr_of_blocks);
return GP_ERROR;
}
nr_of_blocks = 512 / nr_of_blocks;
gp_log(GP_LOG_DEBUG,"pccam600 library: init","nr_of_blocks %d",nr_of_blocks);
if (nr_of_blocks == 0) {
- gp_context_error(context,_("pccam600_init: Expected %d blocks got %d"),64,nr_of_blocks);
+ gp_context_error(context,_("pccam600_init: Expected %d blocks got %d"),64,nr_of_blocks);
return GP_ERROR;
}
gp_port_set_timeout(port,500);
@@ -233,5 +233,5 @@ int pccam600_init(GPPort *port, GPContext *context){
}
}
return GP_OK;
-
+
}
diff --git a/camlibs/pccam600/pccam600.h b/camlibs/pccam600/pccam600.h
index 88f353d4a..42d7a46db 100644
--- a/camlibs/pccam600/pccam600.h
+++ b/camlibs/pccam600/pccam600.h
@@ -1,5 +1,5 @@
/* pccam600.h
- *
+ *
* This library is free software; you can redistribute and/or
* modify it inder the terms of the GNU Lesser Genreral Public
* License as publiced by the Free Software Foundation; either
diff --git a/camlibs/pentax/js0n.c b/camlibs/pentax/js0n.c
index 948f7823e..a8cd645a6 100644
--- a/camlibs/pentax/js0n.c
+++ b/camlibs/pentax/js0n.c
@@ -27,7 +27,7 @@ const char *js0n(const char *key, size_t klen,
size_t index = 1;
int depth = 0;
int utf8_remain = 0;
- static void *gostruct[] =
+ static void *gostruct[] =
{
[0 ... 255] = &&l_bad,
['\t'] = &&l_loop, [' '] = &&l_loop, ['\r'] = &&l_loop, ['\n'] = &&l_loop,
@@ -39,7 +39,7 @@ const char *js0n(const char *key, size_t klen,
[65 ... 90] = &&l_bare, // A-Z
[97 ... 122] = &&l_bare // a-z
};
- static void *gobare[] =
+ static void *gobare[] =
{
[0 ... 31] = &&l_bad,
[32 ... 126] = &&l_loop, // could be more pedantic/validation-checking
@@ -47,7 +47,7 @@ const char *js0n(const char *key, size_t klen,
[','] = &&l_unbare, [']'] = &&l_unbare, ['}'] = &&l_unbare, [':'] = &&l_unbare,
[127 ... 255] = &&l_bad
};
- static void *gostring[] =
+ static void *gostring[] =
{
[0 ... 31] = &&l_bad, [127] = &&l_bad,
[32 ... 126] = &&l_loop,
@@ -64,17 +64,17 @@ const char *js0n(const char *key, size_t klen,
[128 ... 191] = &&l_utf_continue,
[192 ... 255] = &&l_bad
};
- static void *goesc[] =
+ static void *goesc[] =
{
[0 ... 255] = &&l_bad,
['"'] = &&l_unesc, ['\\'] = &&l_unesc, ['/'] = &&l_unesc, ['b'] = &&l_unesc,
['f'] = &&l_unesc, ['n'] = &&l_unesc, ['r'] = &&l_unesc, ['t'] = &&l_unesc, ['u'] = &&l_unesc
};
void **go = gostruct;
-
+
if(!json || jlen <= 0 || !vlen) return 0;
*vlen = 0;
-
+
// no key is array mode, klen provides requested index
if(!key)
{
@@ -89,14 +89,14 @@ const char *js0n(const char *key, size_t klen,
goto *go[(unsigned char)*cur];
l_loop:;
}
-
+
if(depth) *vlen = jlen; // incomplete
return 0;
-
+
l_bad:
*vlen = cur - json; // where error'd
return 0;
-
+
l_up:
PUSH(0);
++depth;
@@ -116,11 +116,11 @@ const char *js0n(const char *key, size_t klen,
CAP(-1);
go=gostruct;
goto l_loop;
-
+
l_esc:
go = goesc;
goto l_loop;
-
+
l_unesc:
go = gostring;
goto l_loop;
diff --git a/camlibs/pentax/library.c b/camlibs/pentax/library.c
index 8e3885dad..b4cebf359 100644
--- a/camlibs/pentax/library.c
+++ b/camlibs/pentax/library.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -820,7 +820,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
if (foo != valid_resolutions[i])
resolution = i;
}
-
+
if (resolution == -1) {
gp_log (GP_LOG_ERROR, "pentax", "Could not decode image size %s", sval);
} else {
@@ -974,7 +974,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
pslr_disconnect (&camera->pl->pslr);
free (camera->pl);
@@ -996,7 +996,7 @@ pslr_result get_drive_info(char* driveName, FDTYPE* hDevice,
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
CameraPrivateLibrary *cpl;
diff --git a/camlibs/polaroid/dlink350f.c b/camlibs/polaroid/dlink350f.c
index 8d4cf8880..29ff6bda0 100644
--- a/camlibs/polaroid/dlink350f.c
+++ b/camlibs/polaroid/dlink350f.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -58,17 +58,17 @@ int dlink_dsc350f_postprocessing_and_flip_both (int width, int height, unsigned
int whichcolor = 0;
int lowred=255, lowgreen=255, lowblue=255;
int hired=0, higreen=0, hiblue=0;
-
+
GP_DEBUG("flipping byte order");
-
+
/* flip image left/right and top/bottom (actually reverse byte order) */
start = rgb;
end = start + ((width * height) * 3);
-
+
while (start < end) {
c = *start;
-
- /* validation - debugging info - collect the color range info
+
+ /* validation - debugging info - collect the color range info
* for first half of image.
*/
switch (whichcolor % 3) {
@@ -82,26 +82,26 @@ int dlink_dsc350f_postprocessing_and_flip_both (int width, int height, unsigned
MINMAX((int)c,lowred,hired);
break;
}
-
+
/* adjust color magnitude, since it appears that the 350f only had 7 bits of color info */
*start++ = *--end << 1;
*end = c << 1;
-
+
whichcolor++;
}
-
+
/* could do more color processing here
GP_DEBUG("adjusting color");
-
+
// adjust image colours
start = rgb;
end = start + ((width * height) * 3);
-
+
while (start < end) {
c = *start++;
}
*/
-
+
/* show the color range of image in debug mode. */
GP_DEBUG("\nred low = %d high = %d\ngreen low = %d high = %d\nblue low = %d high = %d\n", lowred,hired, lowgreen,higreen, lowblue,hiblue);
return GP_OK;
diff --git a/camlibs/polaroid/dlink350f.h b/camlibs/polaroid/dlink350f.h
index a43902808..c33fd5d6c 100644
--- a/camlibs/polaroid/dlink350f.h
+++ b/camlibs/polaroid/dlink350f.h
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/polaroid/jd350e.c b/camlibs/polaroid/jd350e.c
index ba0836bd4..dafd1257c 100644
--- a/camlibs/polaroid/jd350e.c
+++ b/camlibs/polaroid/jd350e.c
@@ -1,6 +1,6 @@
/* jd350e.c
*
- * White balancing and brightness correction for the Jenoptik
+ * White balancing and brightness correction for the Jenoptik
* JD350 entrance camera
*
* Copyright 2001 Michael Trawny <trawny99@users.sourceforge.net>
@@ -10,10 +10,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -55,8 +55,8 @@
int jd350e_postprocessing(int width, int height, unsigned char* rgb){
int
x,y,
- red_min=255, red_max=0,
- blue_min=255, blue_max=0,
+ red_min=255, red_max=0,
+ blue_min=255, blue_max=0,
green_min=255, green_max=0;
double
min, max, amplify;
@@ -157,7 +157,7 @@ int trust350fs_postprocessing(int width, int height, unsigned char* rgb) {
double amplify;
unsigned char *buf;
const int brightness_adjust = 16;
-
+
/* flip horizontal */
#define RED(p,x,y,w) *((p)+3*((y)*(w)+(x)) )
#define GREEN(p,x,y,w) *((p)+3*((y)*(w)+(x))+1)
@@ -172,7 +172,7 @@ int trust350fs_postprocessing(int width, int height, unsigned char* rgb) {
SWAP( BLUE(rgb,x,y,width), BLUE(rgb,width-x-1,y,width));
}
}
-
+
/* flip vertical */
buf = malloc(width*3);
if (!buf) return GP_ERROR_NO_MEMORY;
@@ -182,7 +182,7 @@ int trust350fs_postprocessing(int width, int height, unsigned char* rgb) {
memcpy(rgb+(height-i-1)*width*3,buf,width*3);
}
free(buf);
-
+
/* Normalize & adjust brightness ... */
#define MINMAX(a,min,max) { (min)=MIN(min,a); (max)=MAX(max,a); }
@@ -201,7 +201,7 @@ int trust350fs_postprocessing(int width, int height, unsigned char* rgb) {
for(i=0; i<(width*height*3); i++)
{
int val = amplify * (rgb[i] - min);
-
+
if(val < brightness_adjust)
rgb[i] = val * 2;
else if (val > (255 - brightness_adjust))
@@ -209,6 +209,6 @@ int trust350fs_postprocessing(int width, int height, unsigned char* rgb) {
else
rgb[i] = val + brightness_adjust;
}
-
+
return GP_OK;
}
diff --git a/camlibs/polaroid/jd350e.h b/camlibs/polaroid/jd350e.h
index 6b3916cdc..2de3ba309 100644
--- a/camlibs/polaroid/jd350e.h
+++ b/camlibs/polaroid/jd350e.h
@@ -1,6 +1,6 @@
/* jd350e.h
*
- * White balancing and brightness correction for the Jenoptik
+ * White balancing and brightness correction for the Jenoptik
* JD350 entrance camera
*
* Copyright 2001 Michael Trawny <trawny99@users.sourceforge.net>
@@ -10,10 +10,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/polaroid/jd350e_blue.h b/camlibs/polaroid/jd350e_blue.h
index c30e1570c..07c1229ba 100644
--- a/camlibs/polaroid/jd350e_blue.h
+++ b/camlibs/polaroid/jd350e_blue.h
@@ -1,6 +1,6 @@
/* jd350e_blue.h
*
- * White balancing curve for indoor / electric light pictures
+ * White balancing curve for indoor / electric light pictures
* (experimental)
*
* Copyright 2001 Michael Trawny <trawny99@users.sourceforge.net>
@@ -19,7 +19,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
- */
+ */
static unsigned jd350e_blue_curve [] = {
0, 2, 5, 7,
10, 13, 15, 18,
diff --git a/camlibs/polaroid/jd350e_red.h b/camlibs/polaroid/jd350e_red.h
index f1495e777..29773246d 100644
--- a/camlibs/polaroid/jd350e_red.h
+++ b/camlibs/polaroid/jd350e_red.h
@@ -18,7 +18,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
- */
+ */
static unsigned jd350e_red_curve [] = {
0, 1, 2, 3,
diff --git a/camlibs/polaroid/pdc320.c b/camlibs/polaroid/pdc320.c
index 5473da164..1b69bbb65 100644
--- a/camlibs/polaroid/pdc320.c
+++ b/camlibs/polaroid/pdc320.c
@@ -138,7 +138,7 @@ pdc320_calc_checksum(const unsigned char *buf, int buflen) {
while (checksum > 0xffff) {
checksum =
- (checksum & 0xffff) +
+ (checksum & 0xffff) +
((checksum >> 16) & 0xffff);
}
return 0xffff-checksum; /* neg checksum actually */
@@ -215,7 +215,7 @@ pdc320_init (GPPort *port)
int i;
GP_DEBUG ("*** PDC320_INIT ***");
-
+
/* The initial command is prefixed by 4 raw E6. */
memset(e6,0xe6,sizeof(e6));
CR (gp_port_write (port, (char *)e6, sizeof (e6) ));
@@ -278,7 +278,7 @@ pdc320_0c (Camera *camera, int n)
int size, i;
unsigned char buf[3], *xbuf;
unsigned char cmd[2];
-
+
cmd[0] = 0x0c;
cmd[1] = n; /* n is from 1 on up */
@@ -346,7 +346,7 @@ pdc320_pic (Camera *camera, int n, unsigned char **data, int *size)
/* Read the actual data */
usleep(1000);
CR_FREE (gp_port_read (camera->port, (char *)*data + i, len), *data);
-
+
/* Read the checksum */
CR_FREE (gp_port_read (camera->port, (char *)buf, 2), *data);
}
@@ -363,7 +363,7 @@ camera_id (CameraText *id)
}
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
int i;
CameraAbilities a;
diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c
index 62c6e8b3d..30a4aa88b 100644
--- a/camlibs/ptp2/chdk.c
+++ b/camlibs/ptp2/chdk.c
@@ -63,8 +63,8 @@
/* Include the rlibs.lua lua libs or try do it on our own? */
-/* capture:
- * send LUA:
+/* capture:
+ * send LUA:
* init_usb_capture(0); is exiting capture
* init_usb_capture(1,0,0) 1 = jpeg, 2 = raw, 4 = switch raw to dng
@@ -76,7 +76,7 @@
* return ff_download(srcpaths[,ropts])
*
* return ff_mdelete(paths)
- *
+ *
* return os.stat(path)
* return os.utime(path)
* return os.mkdir(path)
@@ -135,7 +135,7 @@ chdk_generic_script_run (
if (*table) {
*table = realloc(*table,strlen(*table)+strlen(msg->data)+1);
strcat(*table,msg->data);
- } else {
+ } else {
*table = strdup(msg->data);
}
break;
@@ -144,7 +144,7 @@ chdk_generic_script_run (
if (*table) {
*table = realloc(*table,strlen(*table)+strlen(msg->data)+1);
strcat(*table,msg->data);
- } else {
+ } else {
*table = strdup(msg->data);
}
break;
@@ -528,7 +528,7 @@ chdk_camera_summary (Camera *camera, CameraText *text, GPContext *context)
ret = chdk_generic_script_run (params, "return get_flash_mode()", NULL, &retint, context);
sprintf (s, _("Flash Mode: %d\n"), retint); s += strlen(s);
return ret;
-/*
+/*
Mode: 256
SV96: 603, ISO: 243
TV96: 478, Shutterspeed: 0
@@ -881,7 +881,7 @@ static int
chdk_get_capmode(CONFIG_GET_ARGS) {
char *s , *table = NULL;
int retint = 0;
- const char *lua =
+ const char *lua =
PTP_CHDK_LUA_SERIALIZE \
"capmode=require'capmode'\n"
"str=''\n"
@@ -923,7 +923,7 @@ static int
chdk_put_capmode(CONFIG_PUT_ARGS) {
char *val;
char lua[200];
- const char *luastr =
+ const char *luastr =
"capmode=require'capmode'\n"
"str='%s'\n"
"for id,name in ipairs(capmode.mode_to_name) do\n"
@@ -1109,7 +1109,7 @@ chdk_camera_set_config (Camera *camera, CameraWidget *window, GPContext *context
}
static int
-chdk_camera_exit (Camera *camera, GPContext *context)
+chdk_camera_exit (Camera *camera, GPContext *context)
{
camera_unprepare_chdk_capture(camera, context);
return GP_OK;
diff --git a/camlibs/ptp2/chdk_live_view.h b/camlibs/ptp2/chdk_live_view.h
index 8bf8f8372..d45e40fef 100644
--- a/camlibs/ptp2/chdk_live_view.h
+++ b/camlibs/ptp2/chdk_live_view.h
@@ -1,7 +1,7 @@
#ifndef __LIVE_VIEW_H
#define __LIVE_VIEW_H
-// Note: used in modules and platform independent code.
+// Note: used in modules and platform independent code.
// Do not add platform dependent stuff in here (#ifdef/#endif compile options or camera dependent values)
/*
@@ -9,12 +9,12 @@ Protocol notes:
- Unless otherwise specified, all structure values are packed in camera native (little
endian) byte order
- Frame buffer and palette data are in native camera formats
- Some documentation may be found at http://chdk.wikia.com/wiki/Frame_buffers
+ Some documentation may be found at http://chdk.wikia.com/wiki/Frame_buffers
- The frame buffer descriptions returned may not be correct depending on the
camera model and various camera settings (shooting mode, digital zoom, aspect ratio)
This may result in partial images, garbage in the "valid" area or incorrect position
- In some cases, the requested data may not be available. If this happens, the framebuffer
- or palette data offset will be zero.
+ or palette data offset will be zero.
- The frame buffer descriptions are returned regardless of whether the data is available
- New enum values (e.g. aspect ratio, framebuffer type, palette type) may be added in minor
versions.
diff --git a/camlibs/ptp2/chdk_ptp.h b/camlibs/ptp2/chdk_ptp.h
index 65dcfd787..8adbd2717 100644
--- a/camlibs/ptp2/chdk_ptp.h
+++ b/camlibs/ptp2/chdk_ptp.h
@@ -3,7 +3,7 @@
// CHDK PTP protocol interface (can also be used in client PTP programs)
-// Note: used in modules and platform independent code.
+// Note: used in modules and platform independent code.
// Do not add platform dependent stuff in here (#ifdef/#endif compile options or camera dependent values)
#define PTP_CHDK_VERSION_MAJOR 2 // increase only with backwards incompatible changes (and reset minor)
@@ -63,7 +63,7 @@ enum PTP_CHDK_Command {
// for script return and users this is ptp_chdk_script_data_type
// for error ptp_chdk_script_error_type
// return param3 is script id of script that generated the message
- // return param4 is length of the message data.
+ // return param4 is length of the message data.
// return data is message.
// A minimum of 1 bytes of zeros is returned if the message has no data (empty string or type NONE)
PTP_CHDK_WriteScriptMsg, // write a message for scripts running on camera
@@ -77,12 +77,12 @@ enum PTP_CHDK_Command {
// param2 bitmask of data
// output param1 = total size of data
// return data is protocol information, frame buffer descriptions and selected display data
- // Currently a data phase is always returned. Future versions may define other behavior
+ // Currently a data phase is always returned. Future versions may define other behavior
// for values in currently unused parameters.
// Direct image capture over USB.
// Use lua get_usb_capture_support for available data types, lua init_usb_capture for setup
PTP_CHDK_RemoteCaptureIsReady, // Check if data is available
- // return param1 is status
+ // return param1 is status
// 0 = not ready
// 0x10000000 = remote capture not initialized
// otherwise bitmask of PTP_CHDK_CAPTURE_* datatypes
@@ -102,7 +102,7 @@ enum ptp_chdk_script_data_type {
PTP_CHDK_TYPE_BOOLEAN,
PTP_CHDK_TYPE_INTEGER,
PTP_CHDK_TYPE_STRING, // Empty strings are returned with length=0
- PTP_CHDK_TYPE_TABLE, // tables are converted to a string by usb_msg_table_to_string,
+ PTP_CHDK_TYPE_TABLE, // tables are converted to a string by usb_msg_table_to_string,
// this function can be overridden in lua to change the format
// the string may be empty for an empty table
};
@@ -570,7 +570,7 @@ end\n"
/*
Full jpeg file. Note supported on all cameras, use Lua get_usb_capture_support to check
*/
-#define PTP_CHDK_CAPTURE_JPG 0x1
+#define PTP_CHDK_CAPTURE_JPG 0x1
/*
Raw framebuffer data, in camera native format.
@@ -579,7 +579,7 @@ A subset of rows may be requested in init_usb_capture.
#define PTP_CHDK_CAPTURE_RAW 0x2
/*
-DNG header.
+DNG header.
The header will be DNG version 1.3
Does not include image data, clients wanting to create a DNG file should also request RAW
Raw data for all known cameras will be packed, little endian. Client is responsible for
@@ -596,7 +596,7 @@ adjusting dimensions.
Bad pixels will not be patched, but DNG opcodes will specify how to patch them
*/
-#define PTP_CHDK_CAPTURE_DNGHDR 0x4
+#define PTP_CHDK_CAPTURE_DNGHDR 0x4
// status from PTP_CHDK_RemoteCaptureIsReady if capture not enabled
#define PTP_CHDK_CAPTURE_NOTSET 0x10000000
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index 7d687ecce..b9887fdce 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -486,7 +486,7 @@ int
camera_prepare_capture (Camera *camera, GPContext *context)
{
PTPParams *params = &camera->pl->params;
-
+
GP_LOG_D ("prepare_capture");
switch (params->deviceinfo.VendorExtensionID) {
case PTP_VENDOR_FUJI:
@@ -1013,7 +1013,7 @@ _put_AUINT8_as_CHAR_ARRAY(CONFIG_PUT_ARGS) {
static int
_get_Range_INT8(CONFIG_GET_ARGS) {
float CurrentValue;
-
+
if (dpd->FormFlag != PTP_DPFF_Range)
return (GP_ERROR_NOT_SUPPORTED);
if (dpd->DataType != PTP_DTC_INT8)
@@ -1039,7 +1039,7 @@ _put_Range_INT8(CONFIG_PUT_ARGS) {
static int
_get_Range_UINT8(CONFIG_GET_ARGS) {
float CurrentValue;
-
+
if (dpd->FormFlag != PTP_DPFF_Range)
return (GP_ERROR_NOT_SUPPORTED);
if (dpd->DataType != PTP_DTC_UINT8)
@@ -1894,7 +1894,7 @@ _put_Nikon_HueAdjustment(CONFIG_PUT_ARGS)
if (dpd->FormFlag & PTP_DPFF_Enumeration) {
char *val;
int ival;
-
+
CR (gp_widget_get_value(widget, &val));
sscanf (val, "%d", &ival);
propval->i8 = ival;
@@ -3643,7 +3643,7 @@ static struct deviceproptableu16 nikon_d850_focus_metering[] = {
{ N_("Dynamic-area AF (72 points)"),0x8013, PTP_VENDOR_NIKON},
{ N_("Dynamic-area AF (153 points)"), 0x8014, PTP_VENDOR_NIKON},
{ N_("Group-area AF"), 0x8015, PTP_VENDOR_NIKON},
- { N_("Dynamic-area AF (9 points)"), 0x8016, PTP_VENDOR_NIKON},
+ { N_("Dynamic-area AF (9 points)"), 0x8016, PTP_VENDOR_NIKON},
{ N_("Pinpoint AF"), 0x8017, PTP_VENDOR_NIKON}, /* on Z */
{ N_("Wide-area AF (S)"), 0x8018, PTP_VENDOR_NIKON}, /* on Z */
@@ -3772,7 +3772,7 @@ static struct deviceproptableu16 flash_mode[] = {
{ N_("Slow sync"), 0x8004, PTP_VENDOR_FUJI},
{ N_("Rear-curtain with slow sync"), 0x8005, PTP_VENDOR_FUJI},
{ N_("Rear-curtain sync"), 0x8006, PTP_VENDOR_FUJI},
-
+
{ N_("Rear Curtain Sync"), 0x8003, PTP_VENDOR_SONY},
{ N_("Wireless Sync"), 0x8004, PTP_VENDOR_SONY},
{ N_("Slow Sync"), 0x8032, PTP_VENDOR_SONY},
@@ -4411,7 +4411,7 @@ _put_Sony_ShutterSpeed(CONFIG_PUT_ARGS) {
/* old style uses stepping */
new = ((float)x)/(float)y;
-
+
if (old > new) {
value.u8 = 0x01;
direction = 1;
@@ -4420,8 +4420,8 @@ _put_Sony_ShutterSpeed(CONFIG_PUT_ARGS) {
value.u8 = 0xff;
direction = -1;
}
-
- if (direction == 1) {
+
+ if (direction == 1) {
for (i=0;i<sizeof(sony_shuttertable)/sizeof(sony_shuttertable[0]);i++) {
a = sony_shuttertable[i].dividend;
b = sony_shuttertable[i].divisor;
@@ -4438,7 +4438,7 @@ _put_Sony_ShutterSpeed(CONFIG_PUT_ARGS) {
break;
}
}
-
+
do {
origval = dpd->CurrentValue.u32;
if (old == new)
@@ -4451,13 +4451,13 @@ _put_Sony_ShutterSpeed(CONFIG_PUT_ARGS) {
if (current >= ((float)a)/(float)b)
break;
}
-
- // Calculating jump width
+
+ // Calculating jump width
if (direction > 0)
value.u8 = 0x00 + position_new - position_current;
else
value.u8 = 0x100 + position_new - position_current;
-
+
a = dpd->CurrentValue.u32>>16;
b = dpd->CurrentValue.u32&0xffff;
C_PTP_REP (ptp_sony_setdevicecontrolvalueb (params, dpd->DevicePropertyCode, &value, PTP_DTC_UINT8 ));
@@ -4477,7 +4477,7 @@ _put_Sony_ShutterSpeed(CONFIG_PUT_ARGS) {
a = dpd->CurrentValue.u32>>16;
b = dpd->CurrentValue.u32&0xffff;
current = ((float)a)/((float)b);
-
+
if ((a*y != 0) && (a*y == b*x)) {
GP_LOG_D ("Value matched via math(tm) %d/%d == %d/%d!",x,y,a,b);
break;
@@ -4492,7 +4492,7 @@ _put_Sony_ShutterSpeed(CONFIG_PUT_ARGS) {
time(&end);
} while (end-start <= 3);
-
+
if (direction > 0 && current <= new) {
GP_LOG_D ("Overshooted value, maybe choice not available!");
break;
@@ -5374,16 +5374,16 @@ static struct deviceproptableu8 nikon_d850_moviequality[] = {
{"3840x2160; 30p", 0, 0},
{"3840x2160; 25p", 1, 0},
{"3840x2160; 24p", 2, 0},
-
+
{"1920x1080; 60p", 3, 0},
{"1920x1080; 50p", 4, 0},
{"1920x1080; 30p", 5, 0},
{"1920x1080; 25p", 6, 0},
{"1920x1080; 24p", 7, 0},
-
+
{"1280x720; 60p", 8, 0},
{"1280x720; 50p", 9, 0},
-
+
{"1920x1080; 30p x4 (slow-mo)", 10, 0},
{"1920x1080; 25p x4 (slow-mo)", 11, 0},
{"1920x1080; 24p x5 (slow-mo)", 12, 0},
@@ -6436,7 +6436,7 @@ _put_Nikon_ControlMode(CONFIG_PUT_ARGS) {
return GP_ERROR_NOT_SUPPORTED;
gp_widget_get_value(widget, &val);
- if (!sscanf(val,"%d",&xval))
+ if (!sscanf(val,"%d",&xval))
return GP_ERROR;
C_PTP (ptp_nikon_changecameramode (&camera->pl->params, xval));
@@ -6781,7 +6781,7 @@ _put_Canon_CHDK_Script(CONFIG_PUT_ARGS) {
int script_id;
unsigned int status;
int luastatus;
-
+
CR (gp_widget_get_value(widget, &script));
// Nafraf: Working on this!!!
@@ -7405,7 +7405,7 @@ _put_Sony_ManualFocus(CONFIG_PUT_ARGS)
CR (gp_widget_get_value(widget, &val));
if(val != 0.0) {
- /* value 2 seems to set it to autofocusmode. see issue https://github.com/gphoto/libgphoto2/issues/434
+ /* value 2 seems to set it to autofocusmode. see issue https://github.com/gphoto/libgphoto2/issues/434
xpropval.u16 = 2;
C_PTP (ptp_sony_setdevicecontrolvalueb (params, 0xd2d2, &xpropval, PTP_DTC_UINT16));
*/
@@ -8262,7 +8262,7 @@ _put_nikon_list_wifi_profiles (CONFIG_PUT_ARGS)
}
/* FIXME: deleted entry still exists, rebuild tree if deleted = 1 ? */
-
+
return GP_OK;
}
@@ -8321,7 +8321,7 @@ _get_nikon_list_wifi_profiles (CONFIG_GET_ARGS)
params->wifi_profiles[i].device_type);
gp_widget_set_value(child2, buffer);
gp_widget_append(child, child2);
-
+
gp_widget_new (GP_WIDGET_TEXT, "Dates", &child2);
snprintf (buffer, 4096,
_("Creation date: %s, Last usage date: %s"),
@@ -8343,7 +8343,7 @@ _get_nikon_list_wifi_profiles (CONFIG_GET_ARGS)
static int
_get_nikon_wifi_profile_prop(CONFIG_GET_ARGS) {
char buffer[1024];
-
+
gp_widget_new (GP_WIDGET_TEXT, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
gp_setting_get("ptp2_wifi",menu->name,buffer);
@@ -8364,7 +8364,7 @@ static int
_get_nikon_wifi_profile_channel(CONFIG_GET_ARGS) {
char buffer[1024];
float val;
-
+
gp_widget_new (GP_WIDGET_RANGE, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
gp_setting_get("ptp2_wifi", menu->name, buffer);
@@ -8373,7 +8373,7 @@ _get_nikon_wifi_profile_channel(CONFIG_GET_ARGS) {
if (!val)
val = 1.0;
gp_widget_set_value(*widget, &val);
-
+
return (GP_OK);
}
@@ -8402,18 +8402,18 @@ _get_nikon_wifi_profile_encryption(CONFIG_GET_ARGS) {
char buffer[1024];
int i;
int val;
-
+
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
gp_setting_get("ptp2_wifi", menu->name, buffer);
val = atoi(buffer);
-
+
for (i = 0; encryption_values[i]; i++) {
gp_widget_add_choice(*widget, _(encryption_values[i]));
if (i == val)
gp_widget_set_value(*widget, _(encryption_values[i]));
}
-
+
return (GP_OK);
}
@@ -8447,18 +8447,18 @@ _get_nikon_wifi_profile_accessmode(CONFIG_GET_ARGS) {
char buffer[1024];
int i;
int val;
-
+
gp_widget_new (GP_WIDGET_RADIO, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
gp_setting_get("ptp2_wifi", menu->name, buffer);
val = atoi(buffer);
-
+
for (i = 0; accessmode_values[i]; i++) {
gp_widget_add_choice(*widget, _(accessmode_values[i]));
if (i == val)
gp_widget_set_value(*widget, _(accessmode_values[i]));
}
-
+
return (GP_OK);
}
@@ -8550,7 +8550,7 @@ _put_nikon_wifi_profile_write(CONFIG_PUT_ARGS) {
/* Encryption */
gp_setting_get("ptp2_wifi","encryption",buffer);
profile.encryption = atoi(buffer);
-
+
if (profile.encryption != 0) {
gp_setting_get("ptp2_wifi","key",buffer);
i = 0;
@@ -8595,7 +8595,7 @@ _get_nikon_create_wifi_profile (CONFIG_GET_ARGS)
{
int submenuno, ret;
CameraWidget *subwidget;
-
+
gp_widget_new (GP_WIDGET_SECTION, _(menu->label), widget);
gp_widget_set_name (*widget, menu->name);
@@ -8606,7 +8606,7 @@ _get_nikon_create_wifi_profile (CONFIG_GET_ARGS)
if (ret == GP_OK)
gp_widget_append (*widget, subwidget);
}
-
+
return GP_OK;
}
@@ -8615,7 +8615,7 @@ _put_nikon_create_wifi_profile (CONFIG_PUT_ARGS)
{
int submenuno, ret;
CameraWidget *subwidget;
-
+
for (submenuno = 0; create_wifi_profile_submenu[submenuno].name ; submenuno++ ) {
struct submenu *cursub = create_wifi_profile_submenu+submenuno;
@@ -8674,7 +8674,7 @@ _put_wifi_profiles_menu (CONFIG_MENU_PUT_ARGS)
{
int submenuno, ret;
CameraWidget *subwidget;
-
+
for (submenuno = 0; wifi_profiles_menu[submenuno].name ; submenuno++ ) {
struct submenu *cursub = wifi_profiles_menu+submenuno;
@@ -9173,7 +9173,7 @@ static struct submenu nikon_d850_capture_settings[] = {
{ N_("Image Rotation Flag"), "imagerotationflag", PTP_DPC_NIKON_ImageRotation, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_OffOn_UINT8, _put_Nikon_OffOn_UINT8 },
{ N_("Active D-Lighting"), "dlighting", PTP_DPC_NIKON_ActiveDLighting, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_D850_ActiveDLighting, _put_Nikon_D850_ActiveDLighting },
{ N_("Continuous Shooting Speed Slow"), "shootingspeed", PTP_DPC_NIKON_D1ShootingSpeed, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_D850_ShootingSpeed, _put_Nikon_D850_ShootingSpeed },
- { N_("Movie Resolution"), "moviequality", PTP_DPC_NIKON_MovScreenSize, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_D850_MovieQuality, _put_Nikon_D850_MovieQuality },
+ { N_("Movie Resolution"), "moviequality", PTP_DPC_NIKON_MovScreenSize, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_D850_MovieQuality, _put_Nikon_D850_MovieQuality },
{ N_("Center Weight Area"), "centerweightsize", PTP_DPC_NIKON_CenterWeightArea, PTP_VENDOR_NIKON, PTP_DTC_UINT8, _get_Nikon_D850_CenterWeight, _put_Nikon_D850_CenterWeight },
{ N_("Focus Metering Mode"), "focusmetermode", PTP_DPC_FocusMeteringMode, PTP_VENDOR_NIKON, PTP_DTC_UINT16, _get_Nikon_D850_FocusMetering, _put_Nikon_D850_FocusMetering },
{ 0,0,0,0,0,0,0 },
@@ -9296,7 +9296,7 @@ static struct menu menus[] = {
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0430, nikon_d7100_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0440, nikon_d7500_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0414, nikon_d40_capture_settings, NULL, NULL },
- { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0441, nikon_d850_capture_settings, NULL, NULL },
+ { N_("Capture Settings"), "capturesettings", 0x4b0, 0x0441, nikon_d850_capture_settings, NULL, NULL },
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0442, nikon_z6_capture_settings, NULL, NULL }, /* Z7 */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0x0443, nikon_z6_capture_settings, NULL, NULL }, /* Z6 */
{ N_("Capture Settings"), "capturesettings", 0x4b0, 0, nikon_generic_capture_settings, NULL, NULL },
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index 58d643c86..b093e2242 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -231,7 +231,7 @@ waiting_for_timeout (int *current_wait, struct timeval start, int timeout) {
}
/* Changes the ptp deviceinfo with additional hidden information available,
- * or stuff that requires special tricks
+ * or stuff that requires special tricks
*/
int
fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) {
@@ -351,7 +351,7 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) {
}
/* Newer Canons say that they are MTP devices. Restore Canon vendor extid. */
- if ( ( (di->VendorExtensionID == PTP_VENDOR_MICROSOFT) ||
+ if ( ( (di->VendorExtensionID == PTP_VENDOR_MICROSOFT) ||
(di->VendorExtensionID == PTP_VENDOR_MTP)
) &&
(camera->port->type == GP_PORT_USB) &&
@@ -460,7 +460,7 @@ fixup_cached_deviceinfo (Camera *camera, PTPDeviceInfo *di) {
di->OperationsSupported[di->OperationsSupported_len+6] = PTP_OC_NIKON_EndLiveView;
di->OperationsSupported[di->OperationsSupported_len+7] = PTP_OC_NIKON_GetLiveViewImg;
di->OperationsSupported[di->OperationsSupported_len+8] = PTP_OC_NIKON_ChangeAfArea;
- di->OperationsSupported[di->OperationsSupported_len+9] = PTP_OC_NIKON_InitiateCaptureRecInMedia;
+ di->OperationsSupported[di->OperationsSupported_len+9] = PTP_OC_NIKON_InitiateCaptureRecInMedia;
di->OperationsSupported_len += 10;
}
}
@@ -899,7 +899,7 @@ static struct {
{"HP:PhotoSmart 320 (PTP mode)", 0x03f0, 0x6602, 0},
{"HP:PhotoSmart 720 (PTP mode)", 0x03f0, 0x6702, 0},
{"HP:PhotoSmart 620 (PTP mode)", 0x03f0, 0x6802, 0},
- {"HP:PhotoSmart 735 (PTP mode)", 0x03f0, 0x6a02, 0},
+ {"HP:PhotoSmart 735 (PTP mode)", 0x03f0, 0x6a02, 0},
{"HP:PhotoSmart 707 (PTP mode)", 0x03f0, 0x6b02, 0},
{"HP:PhotoSmart 733 (PTP mode)", 0x03f0, 0x6c02, 0},
{"HP:PhotoSmart 607 (PTP mode)", 0x03f0, 0x6d02, 0},
@@ -1240,7 +1240,7 @@ static struct {
/* Nikon Coolpix 2200 */
{"Nikon:Coolpix 2200 (PTP mode)", 0x04b0, 0x0122, PTP_CAP|PTP_NIKON_BROKEN_CAP},
- /* Jonathan Marten <jonathanmarten@users.sf.net>
+ /* Jonathan Marten <jonathanmarten@users.sf.net>
* https://sourceforge.net/p/gphoto/bugs/968/ */
{"Nikon:Coolpix 2200v1.1 (PTP mode)", 0x04b0, 0x0123, PTP_CAP|PTP_NO_CAPTURE_COMPLETE},
@@ -1374,7 +1374,7 @@ static struct {
/* t.ludewig@gmail.com */
/* N CP A seems capture capable, but does not list vendor commands */
- /* Reports 0x400d aka CaptureComplete event ... but has no
+ /* Reports 0x400d aka CaptureComplete event ... but has no
* vendor commands? yeah right ... */
/* It might be similar to the 1? lets try ... Marcus 20140706 */
{"Nikon:Coolpix A (PTP mode)", 0x04b0, 0x0226, PTP_CAP|PTP_NIKON_1}, /* PTP_CAP */
@@ -1386,7 +1386,7 @@ static struct {
{"Nikon:Coolpix P7800 (PTP mode)", 0x04b0, 0x0229, 0},
/* t.ludewig@gmail.com */
- /* Also reports 0x400d aka CaptureComplete event ... but has no
+ /* Also reports 0x400d aka CaptureComplete event ... but has no
* vendor commands? yeah right... */
{"Nikon:Coolpix P520 (PTP mode)", 0x04b0, 0x0228, 0}, /* PTP_CAP */
@@ -1914,7 +1914,7 @@ static struct {
/* Olaf Hering at SUSE */
{"Canon:PowerShot A590 IS", 0x04a9, 0x3176, PTPBUG_DELETE_SENDS_EVENT},
-
+
/* Dmitriy Khanzhin <jinn@altlinux.org> */
{"Canon:PowerShot A580", 0x04a9, 0x3177, PTPBUG_DELETE_SENDS_EVENT},
@@ -2533,7 +2533,7 @@ static struct {
/* https://github.com/gphoto/libgphoto2/issues/105 */
{"Parrot:Sequoia", 0x19cf, 0x5039, PTP_CAP},
- {"GoPro:HERO" , 0x2672, 0x000c, 0},
+ {"GoPro:HERO" , 0x2672, 0x000c, 0},
{"GoPro:HERO4 Silver" , 0x2672, 0x000d, 0 },
/* https://sourceforge.net/p/gphoto/support-requests/130/ */
@@ -3024,7 +3024,7 @@ camera_capture_stream_preview (Camera *camera, CameraFile *file, GPContext *cont
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_GP_LEICA) &&
(ptp_operation_issupported(params, PTP_OC_LEICA_LEGetStreamData))
) {
- /* ptp header + header before ff d8
+ /* ptp header + header before ff d8
0000 58 1c 00 00 02 00 25 90-0b 00 00 00 02 01 00 00 X.....%.........
0010 46 1c 00 00 00 00 3e 1c-00 00 00 00 b4 00 00 00 F.....>.........
0020 01 00 00 00 04 00 00 00-d4 30 00 00 02 00 00 00 .........0......
@@ -3913,14 +3913,14 @@ capturetriggered:
gp_context_idle (context);
/* do not drain all of the DSLRs compute time */
} while ((done != 3) && waiting_for_timeout (&back_off_wait, capture_start, 70*1000)); /* 70 seconds */
- /* Maximum image time is 30 seconds, but NR processing might take 25 seconds ... so wait longer.
+ /* Maximum image time is 30 seconds, but NR processing might take 25 seconds ... so wait longer.
* see https://github.com/gphoto/libgphoto2/issues/94 */
if (!newobject) newobject = 0xffff0001;
CR (gp_port_set_timeout (camera->port, normal_timeout));
- /* This loop handles single and burst capture.
+ /* This loop handles single and burst capture.
* It also handles SDRAM and also CARD capture.
* In Burst/SDRAM we need to download everything at once
* In all SDRAM modes we download and store it in the virtual fs.
@@ -4671,26 +4671,26 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
/* debug code currently. not working as-is */
if (params->deviceinfo.Model && !strcmp(params->deviceinfo.Model,"X-T1")) { // X-T1 needs this
- /* poll camera until it is ready */
+ /* poll camera until it is ready */
propval.u16 = 0x0000;
int loops = 0, i;
uint16_t *events;
- uint16_t count, ready = 0;
+ uint16_t count, ready = 0;
while (loops < 3300) { // loop for about 33 seconds max
ptp_fuji_getevents (params, &events, &count);
if(count > 0) {
for(i = 0; i < count; i++) {
if(events[i] == 0xd20d) {
ready = 1;
- break;
+ break;
}
- }
+ }
free(events);
if(ready) break;
}
C_PTP_REP (ptp_check_event (params));
- usleep(10000);
- i++;
+ usleep(10000);
+ i++;
}
}
@@ -4715,7 +4715,7 @@ camera_fuji_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
/* Reporter in https://github.com/gphoto/libgphoto2/issues/133 says only 1 event ever is sent, so this does not work */
/* there is a ObjectAdded event being sent */
- /* Marcus: X-Pro2 in current setup also sends just 1 event for the first capture, then none.
+ /* Marcus: X-Pro2 in current setup also sends just 1 event for the first capture, then none.
* We might be missing something after capture.
* But we need to drain the event queue, otherwise wait_event will see this ObjectAdded event again. */
C_PTP_REP (ptp_check_event (params));
@@ -5556,7 +5556,7 @@ camera_trigger_capture (Camera *camera, GPContext *context)
/* Nikon */
if ( (params->deviceinfo.VendorExtensionID == PTP_VENDOR_NIKON) &&
(ptp_operation_issupported(params, PTP_OC_NIKON_InitiateCaptureRecInSdram) ||
- ptp_operation_issupported(params, PTP_OC_NIKON_AfCaptureSDRAM)
+ ptp_operation_issupported(params, PTP_OC_NIKON_AfCaptureSDRAM)
)
&& sdram
) {
@@ -5923,7 +5923,7 @@ camera_wait_for_event (Camera *camera, int timeout,
get_folder_from_handle (camera, ob->oi.StorageID, ob->oi.ParentObject, path->folder);
/* delete last / or we get confused later. */
path->folder[ strlen(path->folder)-1 ] = '\0';
-
+
*eventtype = GP_EVENT_FILE_CHANGED;
*eventdata = path;
return GP_OK;
@@ -7088,7 +7088,7 @@ folder_to_handle(PTPParams *params, const char *folder, uint32_t storage, uint32
if (c != NULL) {
*c = 0;
parent = find_child (params, folder, storage, parent, retob);
- if (parent == PTP_HANDLER_SPECIAL)
+ if (parent == PTP_HANDLER_SPECIAL)
GP_LOG_D("not found???");
return folder_to_handle(params, c+1, storage, parent, retob);
} else {
@@ -7546,7 +7546,7 @@ ptp_mtp_parse_metadata (
GP_LOG_D ("Tag %s is read only, sorry.", propname);
free (content); content = NULL;
continue;
- }
+ }
switch (opd.DataType) {
default:GP_LOG_E ("mtp parser: Unknown datatype %d, content %s", opd.DataType, content);
free (content); content = NULL;
@@ -7591,7 +7591,7 @@ mtp_get_playlist_string(
char *content = NULL;
C_PTP (ptp_mtp_getobjectreferences (params, object_id, &objects, &numobjects));
-
+
for (i=0;i<numobjects;i++) {
char buf[4096];
int len;
@@ -7727,7 +7727,7 @@ gpfile_putfunc (PTPParams *params, void *xpriv,
) {
PTPCFHandlerPrivate* priv= (PTPCFHandlerPrivate*)xpriv;
int ret;
-
+
ret = gp_file_append (priv->file, (char*)bytes, sendlen);
if (ret != GP_OK)
return PTP_ERROR_IO;
@@ -8289,7 +8289,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
find_folder_handle(params, folder, storage, oid);
oid = find_child(params, filename, storage, oid, NULL);
- /* in some cases we return errors ... just ignore them for now */
+ /* in some cases we return errors ... just ignore them for now */
LOG_ON_PTP_E (ptp_deleteobject(params, oid, 0));
/* On some Canon firmwares, a DeleteObject causes a ObjectRemoved event
@@ -8475,7 +8475,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
info->file.height = ob->oi.ImagePixHeight;
info->file.fields |= GP_FILE_INFO_HEIGHT;
}
- }
+ }
return (GP_OK);
}
@@ -8564,7 +8564,7 @@ storage_info_func (CameraFilesystem *fs,
C_PTP (ptp_getstorageinfo (params, sids.Storage[i], &si));
sif->fields |= GP_STORAGEINFO_BASE;
sprintf (sif->basedir, "/"STORAGE_FOLDER_PREFIX"%08x", sids.Storage[i]);
-
+
if (si.VolumeLabel && strlen(si.VolumeLabel)) {
sif->fields |= GP_STORAGEINFO_LABEL;
strcpy (sif->label, si.VolumeLabel);
@@ -8957,7 +8957,7 @@ camera_init (Camera *camera, GPContext *context)
if (!strcmp(params->deviceinfo.Model,"Canon EOS M6 Mark II")) mode = 0x1;
- /* according to reporter only needed in config.c part
+ /* according to reporter only needed in config.c part
if (!strcmp(params->deviceinfo.Model,"Canon PowerShot G5 X")) mode = 0x11;
*/
C_PTP (ptp_canon_eos_setremotemode(params, mode));
@@ -8994,8 +8994,8 @@ camera_init (Camera *camera, GPContext *context)
C_PTP (ptp_sony_9280(params, 0x4,0,1,0,0));
C_PTP (ptp_sony_9281(params, 0x4)); /* gets big data blob? */
- /* also tries this multiple times , but gets back 2006 error
- ptp_sony_9280(params, 0x5,0,1,0,0);
+ /* also tries this multiple times , but gets back 2006 error
+ ptp_sony_9280(params, 0x5,0,1,0,0);
*/
#endif
/* This combination seems to reportedly work */
diff --git a/camlibs/ptp2/music-players.h b/camlibs/ptp2/music-players.h
index 5a7ac4027..b848d3114 100644
--- a/camlibs/ptp2/music-players.h
+++ b/camlibs/ptp2/music-players.h
@@ -371,7 +371,7 @@
* that time it will not respond. Thus GUI programs work fine.
* - Seems also to be used with Galaxy Nexus debug mode and on
* US markets for some weird reason.
- * - has a weird USB bug if it reads exactly 512byte (usb 2 packetsize)
+ * - has a weird USB bug if it reads exactly 512byte (usb 2 packetsize)
* the device will hang. this is one of the reasons we need to disable
* DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST as it can hit this size :/
*
@@ -865,7 +865,7 @@
{ "iRiver", 0x4102, "AK380", 0x1195,
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST | DEVICE_FLAG_NO_ZERO_READS |
DEVICE_FLAG_OGG_IS_UNKNOWN },
- /* https://sourceforge.net/p/libmtp/bugs/1634/
+ /* https://sourceforge.net/p/libmtp/bugs/1634/
* copying flags from above */
{ "iRiver", 0x4102, "AK70", 0x1200,
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST | DEVICE_FLAG_NO_ZERO_READS |
diff --git a/camlibs/ptp2/olympus-wrap.c b/camlibs/ptp2/olympus-wrap.c
index 3ba678464..f890d673b 100644
--- a/camlibs/ptp2/olympus-wrap.c
+++ b/camlibs/ptp2/olympus-wrap.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -95,7 +95,7 @@ typedef struct
unsigned char flags; /* in / out flag mostly */
unsigned char lun; /* 0 here */
unsigned char length; /* of the CDB... but 0x0c is used here in the traces */
- unsigned char cdb[16];
+ unsigned char cdb[16];
} uw_header_t;
/*
@@ -455,7 +455,7 @@ olympus_xml_transfer (PTPParams *params,
oi.Filename = "HRSPONSE.X3C";
oi.ObjectCompressedSize = strlen(evxml);
size = ptp_pack_OI(params, &oi, &oidata);
- res = ptp_transaction (outerparams, &ptp2, PTP_DP_SENDDATA, size, &oidata, NULL);
+ res = ptp_transaction (outerparams, &ptp2, PTP_DP_SENDDATA, size, &oidata, NULL);
if (res != PTP_RC_OK)
return res;
free(oidata);
@@ -482,13 +482,13 @@ olympus_xml_transfer (PTPParams *params,
oi.Filename = "HREQUEST.X3C";
oi.ObjectCompressedSize = strlen(cmdxml);
-/*
-"HRSPONSE.X3C" ... sent back to camera after receiving an event.
+/*
+"HRSPONSE.X3C" ... sent back to camera after receiving an event.
<output><result>2001</result><ec102/></output
*/
size = ptp_pack_OI(params, &oi, &oidata);
- res = ptp_transaction (outerparams, &ptp2, PTP_DP_SENDDATA, size, &oidata, NULL);
+ res = ptp_transaction (outerparams, &ptp2, PTP_DP_SENDDATA, size, &oidata, NULL);
if (res != PTP_RC_OK)
return res;
free(oidata);
@@ -726,7 +726,7 @@ parse_9301_value (PTPParams *params, const char *str, uint16_t type, PTPProperty
if (!sscanf(str,"%02x", &x)) {
ptp_debug( params, "could not parse int8 %s", str);
return PTP_RC_GeneralError;
- }
+ }
ptp_debug( params, "\t%d", x);
propval->i8 = x;
break;
@@ -886,7 +886,7 @@ traverse_output_tree (PTPParams *params, xmlNodePtr node, PTPContainer *resp) {
GP_LOG_E ("failed scanning result from %s", xchar);
resp->Code = result;
GP_LOG_D ("ptp result is 0x%04x", result);
-
+
}
next = xmlNextElementSibling (next);
if (!sscanf ((char*)next->name, "c%04x", &cmd)) {
@@ -1128,8 +1128,8 @@ generate_event_OK_xml(PTPParams *params, PTPContainer *ptp) {
xmlNodePtr x3cnode, inputnode;
char buf[10];
- /*
- "HRSPONSE.X3C" ... sent back to camera after receiving an event.
+ /*
+ "HRSPONSE.X3C" ... sent back to camera after receiving an event.
<output><result>2001</result><ec102/></output
*/
@@ -1276,7 +1276,7 @@ ums_wrap2_event_check (PTPParams* params, PTPContainer* req)
oi.Filename = "HRSPONSE.X3C";
oi.ObjectCompressedSize = strlen(evxml);
size = ptp_pack_OI(params, &oi, &oidata);
- res = ptp_transaction (outerparams, &ptp2, PTP_DP_SENDDATA, size, &oidata, NULL);
+ res = ptp_transaction (outerparams, &ptp2, PTP_DP_SENDDATA, size, &oidata, NULL);
if (res != PTP_RC_OK)
return res;
free(oidata);
diff --git a/camlibs/ptp2/olympus-wrap.h b/camlibs/ptp2/olympus-wrap.h
index e76285b24..28c404e7a 100644
--- a/camlibs/ptp2/olympus-wrap.h
+++ b/camlibs/ptp2/olympus-wrap.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/ptp2/ptp-bugs.h b/camlibs/ptp2/ptp-bugs.h
index 8005f81b9..f627523f4 100644
--- a/camlibs/ptp2/ptp-bugs.h
+++ b/camlibs/ptp2/ptp-bugs.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/ptp2/ptp-pack.c b/camlibs/ptp2/ptp-pack.c
index 09da5a00e..335ef83a7 100644
--- a/camlibs/ptp2/ptp-pack.c
+++ b/camlibs/ptp2/ptp-pack.c
@@ -196,7 +196,7 @@ static inline int
ucs2strlen(uint16_t const * const unicstr)
{
int length = 0;
-
+
/* Unicode strings are terminated with 2 * 0x00 */
for(length = 0; unicstr[length] != 0x0000U; length ++);
return length;
@@ -242,7 +242,7 @@ ptp_pack_string(PTPParams *params, char *string, unsigned char* data, uint16_t o
*len=0;
return;
}
-
+
/* number of characters including terminating 0 (PTP standard confirmed) */
htod8a(&data[offset],packedlen+1);
memcpy(&data[offset+1], &ucs2str[0], packedlen * sizeof(ucs2str[0]));
@@ -258,15 +258,15 @@ ptp_get_packed_stringcopy(PTPParams *params, char *string, uint32_t *packed_size
uint8_t packed[PTP_MAXSTRLEN*2+3], len;
size_t plen;
unsigned char *retcopy = NULL;
-
+
if (string == NULL)
ptp_pack_string(params, "", (unsigned char*) packed, 0, &len);
else
ptp_pack_string(params, string, (unsigned char*) packed, 0, &len);
-
+
/* returned length is in characters, then one byte for string length */
plen = len*2 + 1;
-
+
retcopy = malloc(plen);
if (!retcopy) {
*packed_size = 0;
@@ -399,7 +399,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
&di->OperationsSupported);
totallen=totallen+di->OperationsSupported_len*sizeof(uint16_t)+sizeof(uint32_t);
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 1", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 1", datalen, totallen+PTP_di_OperationsSupported);
return 0;
}
di->EventsSupported_len = ptp_unpack_uint16_t_array(params, data,
@@ -408,7 +408,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
&di->EventsSupported);
totallen=totallen+di->EventsSupported_len*sizeof(uint16_t)+sizeof(uint32_t);
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 2", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 2", datalen, totallen+PTP_di_OperationsSupported);
return 0;
}
di->DevicePropertiesSupported_len =
@@ -418,7 +418,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
&di->DevicePropertiesSupported);
totallen=totallen+di->DevicePropertiesSupported_len*sizeof(uint16_t)+sizeof(uint32_t);
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 3", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 3", datalen, totallen+PTP_di_OperationsSupported);
return 0;
}
di->CaptureFormats_len = ptp_unpack_uint16_t_array(params, data,
@@ -427,7 +427,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
&di->CaptureFormats);
totallen=totallen+di->CaptureFormats_len*sizeof(uint16_t)+sizeof(uint32_t);
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 4", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 4", datalen, totallen+PTP_di_OperationsSupported);
return 0;
}
di->ImageFormats_len = ptp_unpack_uint16_t_array(params, data,
@@ -436,7 +436,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
&di->ImageFormats);
totallen=totallen+di->ImageFormats_len*sizeof(uint16_t)+sizeof(uint32_t);
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 5", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 5", datalen, totallen+PTP_di_OperationsSupported);
return 0;
}
if (!ptp_unpack_string(params, data,
@@ -449,7 +449,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
totallen+=len*2+1;
/* be more relaxed ... as these are optional its ok if they are not here */
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 6", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 6", datalen, totallen+PTP_di_OperationsSupported);
return 1;
}
if (!ptp_unpack_string(params, data,
@@ -462,7 +462,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
totallen+=len*2+1;
/* be more relaxed ... as these are optional its ok if they are not here */
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 7", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 7", datalen, totallen+PTP_di_OperationsSupported);
return 1;
}
if (!ptp_unpack_string(params, data,
@@ -475,7 +475,7 @@ ptp_unpack_DI (PTPParams *params, unsigned char* data, PTPDeviceInfo *di, unsign
totallen+=len*2+1;
/* be more relaxed ... as these are optional its ok if they are not here */
if (datalen <= totallen+PTP_di_OperationsSupported) {
- ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 8", datalen, totallen+PTP_di_OperationsSupported);
+ ptp_debug (params, "datalen %d <= totallen+PTP_di_OperationsSupported %d 8", datalen, totallen+PTP_di_OperationsSupported);
return 1;
}
if (!ptp_unpack_string(params, data,
@@ -539,7 +539,7 @@ ptp_free_EOS_DI (PTPCanonEOSDeviceInfo *di)
free (di->DevicePropertiesSupported);
free (di->unk);
}
-
+
/* ObjectHandles array pack/unpack */
#define PTP_oh 0
@@ -552,7 +552,7 @@ ptp_unpack_OH (PTPParams *params, unsigned char* data, PTPObjectHandles *oh, uns
} else {
oh->n = 0;
oh->Handler = NULL;
- }
+ }
}
/* StoreIDs array pack/unpack */
@@ -669,7 +669,7 @@ ptp_pack_OI (PTPParams *params, PTPObjectInfo *oi, unsigned char** oidataptr)
htod16a(&oidata[PTP_oi_AssociationType],oi->AssociationType);
htod32a(&oidata[PTP_oi_AssociationDesc],oi->AssociationDesc);
htod32a(&oidata[PTP_oi_SequenceNumber],oi->SequenceNumber);
-
+
ptp_pack_string(params, oi->Filename, oidata, PTP_oi_filenamelen, &filenamelen);
/*
filenamelen=(uint8_t)strlen(oi->Filename);
@@ -784,7 +784,7 @@ ptp_unpack_OI (PTPParams *params, unsigned char* data, PTPObjectInfo *oi, unsign
ptp_unpack_string(params, data, PTP_oi_filenamelen, len, &filenamelen, &oi->Filename);
ptp_unpack_string(params, data, PTP_oi_filenamelen+filenamelen*2+1, len, &capturedatelen, &capture_date);
- /* subset of ISO 8601, without '.s' tenths of second and
+ /* subset of ISO 8601, without '.s' tenths of second and
* time zone
*/
oi->CaptureDate = ptp_unpack_PTPTIME(capture_date);
@@ -1133,7 +1133,7 @@ duplicate_DevicePropDesc(const PTPDevicePropDesc *src, PTPDevicePropDesc *dst) {
dst->DevicePropertyCode = src->DevicePropertyCode;
dst->DataType = src->DataType;
dst->GetSet = src->GetSet;
-
+
duplicate_PropertyValue (&src->FactoryDefaultValue, &dst->FactoryDefaultValue, src->DataType);
duplicate_PropertyValue (&src->CurrentValue, &dst->CurrentValue, src->DataType);
@@ -1416,7 +1416,7 @@ _compare_func(const void* x, const void *y) {
static inline int
ptp_unpack_OPL (PTPParams *params, unsigned char* data, MTPProperties **pprops, unsigned int len)
-{
+{
uint32_t prop_count;
MTPProperties *props = NULL;
unsigned int offset = 0, i;
@@ -1785,7 +1785,7 @@ ptp_unpack_EOS_FocusInfoEx (PTPParams* params, unsigned char** data, uint32_t da
}
/* every focuspoint gets 4 (16 bit number possible "-" sign and a x) and a ,*/
- /* initial things around lets say 100 chars at most.
+ /* initial things around lets say 100 chars at most.
* FIXME: check selected when we decode it
*/
if (size < focus_points_in_struct*8) {
@@ -2029,7 +2029,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_OBJECTCONTENT_CHANGE;
ce[i].u.object.oid = dtoh32a(&curdata[PTP_ece_OA_ObjectID]);
break;
- case PTP_EC_CANON_EOS_ObjectInfoChangedEx:
+ case PTP_EC_CANON_EOS_ObjectInfoChangedEx:
case PTP_EC_CANON_EOS_ObjectAddedEx:
if (size < PTP_ece_OA_Name+1) {
ptp_debug (params, "size %d is smaller than %d", size, PTP_ece_OA_Name+1);
@@ -2100,7 +2100,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
break;
}
dpd = &params->canon_props[j].dpd;
- /* 1 - uint16 ?
+ /* 1 - uint16 ?
* 3 - uint16
* 7 - string?
*/
@@ -2510,12 +2510,12 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
i++;
curoff += 2; /* 7, 8 , f */
}
-
+
if (mask & CANON_EOS_OLC_SHUTTERSPEED) {
/* 6 bytes: 01 01 98 10 00 60 */
/* this seesm to be the shutter speed record */
/* EOS 200D seems to have 7 bytes here, sample:
- * 7 bytes: 01 03 98 10 00 70 00
+ * 7 bytes: 01 03 98 10 00 70 00
* EOS R also 7 bytes
* 7 bytes: 01 01 a0 0c 00 0c 00
*/
@@ -2579,7 +2579,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
if (mask & 0x0010) {
/* mask 0x0010: 4 bytes, 04 00 00 00 observed */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo event 0x0010 content 01234567")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo event 0x0010 content 01234567")+1);
sprintf(ce[i].u.info,"OLCInfo event 0x0010 content %02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2595,7 +2595,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
* has the form of 00 00 01 00 XX XX, where the last two bytes
* stand for the number of seconds remaining until the shot */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo event 0x0020 content 0123456789ab")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo event 0x0020 content 0123456789ab")+1);
sprintf(ce[i].u.info,"OLCInfo event 0x0020 content %02x%02x%02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2612,7 +2612,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
/* mask 0x0040: 7 bytes, 01 01 00 00 00 00 00 observed */
/* exposure indicator */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo exposure indicator 012345678901234567890123456789abcd")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo exposure indicator 012345678901234567890123456789abcd")+1);
sprintf(ce[i].u.info,"OLCInfo exposure indicator %d,%d,%d.%d (%02x%02x%02x%02x)",
curdata[curoff],
curdata[curoff+1],
@@ -2628,7 +2628,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
if (mask & 0x0080) {
/* mask 0x0080: 4 bytes, 00 00 00 00 observed */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo event 0x0080 content 01234567")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo event 0x0080 content 01234567")+1);
sprintf(ce[i].u.info,"OLCInfo event 0x0080 content %02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2641,7 +2641,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
if (mask & 0x0100) {
/* mask 0x0100: 6 bytes, 00 00 00 00 00 00 (before focus) and 00 00 00 00 01 00 (on focus) observed */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_FOCUSINFO;
- ce[i].u.info = malloc(strlen("0123456789ab")+1);
+ ce[i].u.info = malloc(strlen("0123456789ab")+1);
sprintf(ce[i].u.info,"%02x%02x%02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2656,7 +2656,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
if (mask & 0x0200) {
/* mask 0x0200: 7 bytes, 00 00 00 00 00 00 00 observed */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_FOCUSMASK;
- ce[i].u.info = malloc(strlen("0123456789abcd0123456789abcdef")+1);
+ ce[i].u.info = malloc(strlen("0123456789abcd0123456789abcdef")+1);
sprintf(ce[i].u.info,"%02x%02x%02x%02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2672,7 +2672,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
if (mask & 0x0400) {
/* mask 0x0400: 7 bytes, 00 00 00 00 00 00 00 observed */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo event 0x0400 content 0123456789abcd")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo event 0x0400 content 0123456789abcd")+1);
sprintf(ce[i].u.info,"OLCInfo event 0x0400 content %02x%02x%02x%02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2689,7 +2689,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
/* mask 0x0800: 8 bytes, 00 00 00 00 00 00 00 00 and 19 01 00 00 00 00 00 00 and others observed */
/* might be mask of focus points selected */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo event 0x0800 content 0123456789abcdef")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo event 0x0800 content 0123456789abcdef")+1);
sprintf(ce[i].u.info,"OLCInfo event 0x0800 content %02x%02x%02x%02x%02x%02x%02x%02x",
curdata[curoff],
curdata[curoff+1],
@@ -2706,7 +2706,7 @@ ptp_unpack_CANON_changes (PTPParams *params, unsigned char* data, int datasize,
if (mask & 0x1000) {
/* mask 0x1000: 1 byte, 00 observed */
ce[i].type = PTP_CANON_EOS_CHANGES_TYPE_UNKNOWN;
- ce[i].u.info = malloc(strlen("OLCInfo event 0x1000 content 01")+1);
+ ce[i].u.info = malloc(strlen("OLCInfo event 0x1000 content 01")+1);
sprintf(ce[i].u.info,"OLCInfo event 0x1000 content %02x",
curdata[curoff]
);
@@ -2819,7 +2819,7 @@ ptp_unpack_Nikon_EC (PTPParams *params, unsigned char* data, unsigned int len, P
return;
*ec = malloc(sizeof(PTPContainer)*(*cnt));
-
+
for (i=0;i<*cnt;i++) {
memset(&(*ec)[i],0,sizeof(PTPContainer));
(*ec)[i].Code = dtoh16a(&data[PTP_nikon_ec_Code+PTP_nikon_ec_Size*i]);
@@ -2859,7 +2859,7 @@ ptp_pack_EK_text(PTPParams *params, PTPEKTextParams *text, unsigned char **data)
ptp_pack_string(params, text->title, curdata, 0, &retlen); curdata+=2*retlen+1;htod16a(curdata,0);curdata+=2;
htod16a(curdata,0x10);curdata+=2;
-
+
for (i=0;i<5;i++) {
ptp_pack_string(params, text->line[i], curdata, 0, &retlen); curdata+=2*retlen+1;htod16a(curdata,0);curdata+=2;
htod16a(curdata,0x10);curdata+=2;
diff --git a/camlibs/ptp2/ptp.c b/camlibs/ptp2/ptp.c
index 8a0e9bbe4..468be492e 100644
--- a/camlibs/ptp2/ptp.c
+++ b/camlibs/ptp2/ptp.c
@@ -88,7 +88,7 @@ static uint16_t ptp_exit_send_memory_handler (PTPDataHandler *handler);
void
ptp_debug (PTPParams *params, const char *format, ...)
-{
+{
va_list args;
va_start (args, format);
@@ -101,11 +101,11 @@ ptp_debug (PTPParams *params, const char *format, ...)
fflush (stderr);
}
va_end (args);
-}
+}
void
ptp_error (PTPParams *params, const char *format, ...)
-{
+{
va_list args;
va_start (args, format);
@@ -139,7 +139,7 @@ ptp_error (PTPParams *params, const char *format, ...)
* filled in (i.e. operation code and parameters). It's up to caller to do
* so.
* The flags decide thether the transaction has a data phase and what is its
- * direction (send or receive).
+ * direction (send or receive).
* If transaction is sending data the sendlen should contain its length in
* bytes, otherwise it's ignored.
* The data should contain an address of a pointer to data going to be sent
@@ -155,14 +155,14 @@ ptp_error (PTPParams *params, const char *format, ...)
* all fields filled in.
**/
uint16_t
-ptp_transaction_new (PTPParams* params, PTPContainer* ptp,
+ptp_transaction_new (PTPParams* params, PTPContainer* ptp,
uint16_t flags, uint64_t sendlen,
PTPDataHandler *handler
) {
int tries;
uint16_t cmd;
- if ((params==NULL) || (ptp==NULL))
+ if ((params==NULL) || (ptp==NULL))
return PTP_ERROR_BADPARAM;
cmd = ptp->Code;
@@ -397,7 +397,7 @@ ptp_exit_fd_handler (PTPDataHandler *handler)
* i.e. it is not necessary to initialize *data or *recvlen beforehand.
*/
uint16_t
-ptp_transaction (PTPParams* params, PTPContainer* ptp,
+ptp_transaction (PTPParams* params, PTPContainer* ptp,
uint16_t flags, uint64_t sendlen,
unsigned char **data, unsigned int *recvlen
) {
@@ -661,7 +661,7 @@ parse_9301_value (PTPParams *params, const char *str, uint16_t type, PTPProperty
if (!sscanf(str,"%02x", &x)) {
ptp_debug( params, "could not parse int8 %s", str);
return PTP_RC_GeneralError;
- }
+ }
ptp_debug( params, "\t%d", x);
propval->i8 = x;
break;
@@ -990,10 +990,10 @@ ptp_olympus_init_pc_mode (PTPParams* params)
usleep(100000);
}
-/*
+/*
* 9489 code: sends a list of PTP device properties supported apparently? on E-M1.
* F4 00 00 00 count
-02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0C D0 0D D0 0E D0 0F D0 10 D0 11 D0 13 D0 14 D0 18 D0 1A D0 1B D0 1C D0 1D D0 1E D0 1F D0 20 D0 21 D0 22 D0 23 D0 24 D0 25 D0 26 D0 27 D0 28 D0 29 D0 2A D0 2B D0 2C D0 2D D0 2E D0 2F D0 30 D0 31 D0 32 D0 33 D0 34 D0 35 D0 36 D0 37 D0 38 D0 39 D0 3A D0 3B D0 3C D0 3D D0 3E D0 3F D0 40 D0 41 D0 42 D0 43 D0 44 D0 45 D0 46 D0 47 D0 48 D0 49 D0 4A D0 4B D0 4C D0 4D D0 4E D0 4F D0 50 D0 51 D0 52 D0 58 D0 59 D0 5F D0 60 D0 61 D0 62 D0 64 D0 65 D0 66 D0 68 D0 69 D0 70 D0 73 D0 67 D0 5A D0 5B D0 63 D0 6A D0 6B D0 6C D0 71 D0 72 D0 7A D0 7B D0 7C D0 7D D0 7F D0 80 D0 81 D0 82 D0 86 D0 87 D0 8B D0 8C D0 8E D0 8F D0 97 D0 9F D0 C4 D0 C5 D0 A2 D0 A3 D0 A4 D0 A6 D0 A7 D0 A8 D0 A9 D0 AA D0 AB D0 AC D0 AD D0 AE D0 B2 D0 B3 D0 B4 D0 B5 D0 B6 D0 B7 D0 B8 D0 B9 D0 BA D0 BC D0 BD D0 BE D0 BF D0 C0 D0 C6 D0 C7 D0 C8 D0 C9 D0 CB D0 CC D0 CD D0 CE D0 CF D0 D0 D0 D1 D0 D2 D0 D3 D0 D4 D0 D5 D0 D6 D0 D7 D0 D8 D0 D9 D0 DA D0 DB D0 DC D0 DD D0 DE D0 E2 D0 E3 D0 E4 D0 E5 D0 E6 D0 E7 D0 E8 D0 E9 D0 EA D0 EC D0 EF D0 F0 D0 F1 D0 F2 D0 F3 D0 F4 D0 F5 D0 F6 D0 F7 D0 F8 D0 F9 D0 FA D0 FB D0 FC D0 FD D0 FE D0 FF D0 00 D1 01 D1 02 D1 03 D1 04 D1 05 D1 06 D1 07 D1 08 D1 09 D1 0A D1 0B D1 0C D1 0D D1 0E D1 0F D1 10 D1 11 D1 12 D1 13 D1 14 D1 15 D1 16 D1 17 D1 18 D1 19 D1 1A D1 1B D1 1C D1 1D D1 1E D1 1F D1 20 D1 51 D1 52 D1 5A D1 24 D1 25 D1 26 D1 27 D1 28 D1 2D D1 2E D1 2F D1 30 D1 31 D1 34 D1 35 D1 36 D1 37 D1 38 D1 39 D1 3A D1
+02 D0 03 D0 04 D0 05 D0 06 D0 07 D0 08 D0 09 D0 0C D0 0D D0 0E D0 0F D0 10 D0 11 D0 13 D0 14 D0 18 D0 1A D0 1B D0 1C D0 1D D0 1E D0 1F D0 20 D0 21 D0 22 D0 23 D0 24 D0 25 D0 26 D0 27 D0 28 D0 29 D0 2A D0 2B D0 2C D0 2D D0 2E D0 2F D0 30 D0 31 D0 32 D0 33 D0 34 D0 35 D0 36 D0 37 D0 38 D0 39 D0 3A D0 3B D0 3C D0 3D D0 3E D0 3F D0 40 D0 41 D0 42 D0 43 D0 44 D0 45 D0 46 D0 47 D0 48 D0 49 D0 4A D0 4B D0 4C D0 4D D0 4E D0 4F D0 50 D0 51 D0 52 D0 58 D0 59 D0 5F D0 60 D0 61 D0 62 D0 64 D0 65 D0 66 D0 68 D0 69 D0 70 D0 73 D0 67 D0 5A D0 5B D0 63 D0 6A D0 6B D0 6C D0 71 D0 72 D0 7A D0 7B D0 7C D0 7D D0 7F D0 80 D0 81 D0 82 D0 86 D0 87 D0 8B D0 8C D0 8E D0 8F D0 97 D0 9F D0 C4 D0 C5 D0 A2 D0 A3 D0 A4 D0 A6 D0 A7 D0 A8 D0 A9 D0 AA D0 AB D0 AC D0 AD D0 AE D0 B2 D0 B3 D0 B4 D0 B5 D0 B6 D0 B7 D0 B8 D0 B9 D0 BA D0 BC D0 BD D0 BE D0 BF D0 C0 D0 C6 D0 C7 D0 C8 D0 C9 D0 CB D0 CC D0 CD D0 CE D0 CF D0 D0 D0 D1 D0 D2 D0 D3 D0 D4 D0 D5 D0 D6 D0 D7 D0 D8 D0 D9 D0 DA D0 DB D0 DC D0 DD D0 DE D0 E2 D0 E3 D0 E4 D0 E5 D0 E6 D0 E7 D0 E8 D0 E9 D0 EA D0 EC D0 EF D0 F0 D0 F1 D0 F2 D0 F3 D0 F4 D0 F5 D0 F6 D0 F7 D0 F8 D0 F9 D0 FA D0 FB D0 FC D0 FD D0 FE D0 FF D0 00 D1 01 D1 02 D1 03 D1 04 D1 05 D1 06 D1 07 D1 08 D1 09 D1 0A D1 0B D1 0C D1 0D D1 0E D1 0F D1 10 D1 11 D1 12 D1 13 D1 14 D1 15 D1 16 D1 17 D1 18 D1 19 D1 1A D1 1B D1 1C D1 1D D1 1E D1 1F D1 20 D1 51 D1 52 D1 5A D1 24 D1 25 D1 26 D1 27 D1 28 D1 2D D1 2E D1 2F D1 30 D1 31 D1 34 D1 35 D1 36 D1 37 D1 38 D1 39 D1 3A D1
*
* 9486: queries something. gets 00 00 00 00 ... or list of devicepropdesc in standard ptp propdesc format.
* could be some form of "properties changed" query perhaps? (32bit count in front)
@@ -1003,8 +1003,8 @@ ptp_olympus_init_pc_mode (PTPParams* params)
* returns properties sent by 94b8.
*
* 948b: also sends a list of ptp devprops:
- * 11 00 00 00 53 D0 54 D0 55 D0 56 D0 57 D0 6D D0 5C D0 5D D0 5E D0 74 D0 75 D0 83 D0 84 D0 85 D0 ED D0 79 D0 E1 D0
- * Events: c008: 21 D1 00 00 0F 00 00 00 01 00 00 00
+ * 11 00 00 00 53 D0 54 D0 55 D0 56 D0 57 D0 6D D0 5C D0 5D D0 5E D0 74 D0 75 D0 83 D0 84 D0 85 D0 ED D0 79 D0 E1 D0
+ * Events: c008: 21 D1 00 00 0F 00 00 00 01 00 00 00
*/
//ptp_debug (params,"PTP: (Olympus Init) getting response...");
//gp_port_set_timeout (camera->port, timeout);
@@ -1354,7 +1354,7 @@ ptp_generic_no_data (PTPParams* params, uint16_t code, unsigned int n_param, ...
/**
* ptp_opensession:
* params: PTPParams*
- * session - session number
+ * session - session number
*
* Establishes a new session.
*
@@ -1809,7 +1809,7 @@ ptp_getobject_to_handler (PTPParams* params, uint32_t handle, PTPDataHandler *ha
* handle - Object handle
* fd - File descriptor to write() to
*
- * Get object 'handle' from device and write the data to the
+ * Get object 'handle' from device and write the data to the
* given file descriptor.
*
* Return values: Some PTP_RC_* code.
@@ -1921,7 +1921,7 @@ ptp_nikon_getlargethumb (PTPParams* params, uint32_t handle, unsigned char** obj
* params: PTPParams*
* handle - object handle
* ofc - object format code (optional)
- *
+ *
* Deletes desired objects.
*
* Return values: Some PTP_RC_* code.
@@ -1992,7 +1992,7 @@ ptp_copyobject (PTPParams* params, uint32_t handle, uint32_t storage, uint32_t p
* uint32_t* parenthandle - Parent ObjectHandle on responder
* uint32_t* handle - see Return values
* PTPObjectInfo* objectinfo- ObjectInfo that is to be sent
- *
+ *
* Sends ObjectInfo of file that is to be sent via SendFileObject.
*
* Return values: Some PTP_RC_* code.
@@ -2004,7 +2004,7 @@ ptp_copyobject (PTPParams* params, uint32_t handle, uint32_t storage, uint32_t p
* for the incoming object
**/
uint16_t
-ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
+ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
uint32_t* parenthandle, uint32_t* handle,
PTPObjectInfo* objectinfo)
{
@@ -2019,7 +2019,7 @@ ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
free(data);
*store=ptp.Param1;
*parenthandle=ptp.Param2;
- *handle=ptp.Param3;
+ *handle=ptp.Param3;
return ret;
}
@@ -2028,7 +2028,7 @@ ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
* params: PTPParams*
* char* object - contains the object that is to be sent
* uint64_t size - object size
- *
+ *
* Sends object to Responder.
*
* Return values: Some PTP_RC_* code.
@@ -2092,7 +2092,7 @@ ptp_sendobject_fromfd (PTPParams* params, int fd, uint64_t size)
#define PROPCACHE_TIMEOUT 5 /* seconds */
uint16_t
-ptp_getdevicepropdesc (PTPParams* params, uint16_t propcode,
+ptp_getdevicepropdesc (PTPParams* params, uint16_t propcode,
PTPDevicePropDesc* devicepropertydesc)
{
PTPContainer ptp;
@@ -2185,7 +2185,7 @@ ptp_setdevicepropvalue (PTPParams* params, uint16_t propcode,
* uint32_t* parenthandle - Parent ObjectHandle on responder
* uint32_t* handle - see Return values
* PTPObjectInfo* objectinfo- ObjectInfo that is to be sent
- *
+ *
* Sends ObjectInfo of file that is to be sent via SendFileObject.
*
* Return values: Some PTP_RC_* code.
@@ -2197,7 +2197,7 @@ ptp_setdevicepropvalue (PTPParams* params, uint16_t propcode,
* for the incoming object
**/
uint16_t
-ptp_ek_sendfileobjectinfo (PTPParams* params, uint32_t* store,
+ptp_ek_sendfileobjectinfo (PTPParams* params, uint32_t* store,
uint32_t* parenthandle, uint32_t* handle,
PTPObjectInfo* objectinfo)
{
@@ -2212,7 +2212,7 @@ ptp_ek_sendfileobjectinfo (PTPParams* params, uint32_t* store,
free(data);
*store=ptp.Param1;
*parenthandle=ptp.Param2;
- *handle=ptp.Param3;
+ *handle=ptp.Param3;
return ret;
}
@@ -2221,7 +2221,7 @@ ptp_ek_sendfileobjectinfo (PTPParams* params, uint32_t* store,
* params: PTPParams*
* char** serial - contains the serial number of the camera
* uint32_t* size - contains the string length
- *
+ *
* Gets the serial number from the device. (ptp serial)
*
* Return values: Some PTP_RC_* code.
@@ -2233,7 +2233,7 @@ ptp_ek_getserial (PTPParams* params, unsigned char **data, unsigned int *size)
PTPContainer ptp;
PTP_CNT_INIT(ptp, PTP_OC_EK_GetSerial);
- return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
+ return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
/**
@@ -2241,7 +2241,7 @@ ptp_ek_getserial (PTPParams* params, unsigned char **data, unsigned int *size)
* params: PTPParams*
* char* serial - contains the new serial number
* uint32_t size - string length
- *
+ *
* Sets the serial number of the device. (ptp serial)
*
* Return values: Some PTP_RC_* code.
@@ -2253,7 +2253,7 @@ ptp_ek_setserial (PTPParams* params, unsigned char *data, unsigned int size)
PTPContainer ptp;
PTP_CNT_INIT(ptp, PTP_OC_EK_SetSerial);
- return ptp_transaction(params, &ptp, PTP_DP_SENDDATA, size, &data, NULL);
+ return ptp_transaction(params, &ptp, PTP_DP_SENDDATA, size, &data, NULL);
}
/* unclear what it does yet */
@@ -2263,7 +2263,7 @@ ptp_ek_9007 (PTPParams* params, unsigned char **data, unsigned int *size)
PTPContainer ptp;
PTP_CNT_INIT(ptp, 0x9007);
- return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
+ return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
/* unclear what it does yet */
@@ -2287,7 +2287,7 @@ ptp_ek_900c (PTPParams* params, unsigned char **data, unsigned int *size)
PTPContainer ptp;
PTP_CNT_INIT(ptp, 0x900c);
- return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
+ return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
/* returned data is 16bit,16bit,32bit,32bit */
}
@@ -2295,7 +2295,7 @@ ptp_ek_900c (PTPParams* params, unsigned char **data, unsigned int *size)
* ptp_ek_settext:
* params: PTPParams*
* PTPEKTextParams* - contains the texts to display.
- *
+ *
* Displays the specified texts on the TFT of the camera.
*
* Return values: Some PTP_RC_* code.
@@ -2322,7 +2322,7 @@ ptp_ek_settext (PTPParams* params, PTPEKTextParams *text)
* params: PTPParams*
* char* object - contains the object that is to be sent
* uint32_t size - object size
- *
+ *
* Sends object to Responder.
*
* Return values: Some PTP_RC_* code.
@@ -2342,7 +2342,7 @@ ptp_ek_sendfileobject (PTPParams* params, unsigned char* object, uint32_t size)
* params: PTPParams*
* PTPDataHandler* handler - contains the handler of the object that is to be sent
* uint32_t size - object size
- *
+ *
* Sends object to Responder.
*
* Return values: Some PTP_RC_* code.
@@ -2373,7 +2373,7 @@ ptp_ek_sendfileobject_from_handler (PTPParams* params, PTPDataHandler*handler, u
* uint32_t p2 - Not fully understood parameter
* 0 - returns full size
* 1 - returns thumbnail size (or EXIF?)
- *
+ *
* Gets form the responder the size of the specified object.
*
* Return values: Some PTP_RC_* code.
@@ -2384,11 +2384,11 @@ ptp_ek_sendfileobject_from_handler (PTPParams* params, PTPDataHandler*handler, u
*
**/
uint16_t
-ptp_canon_getpartialobjectinfo (PTPParams* params, uint32_t handle, uint32_t p2,
- uint32_t* size, uint32_t* rp2)
+ptp_canon_getpartialobjectinfo (PTPParams* params, uint32_t handle, uint32_t p2,
+ uint32_t* size, uint32_t* rp2)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetPartialObjectInfo, handle, p2);
*size = *rp2 = 0;
CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL));
@@ -2449,9 +2449,9 @@ ptp_canon_get_directory (PTPParams* params,
* ptp_canon_gettreeinfo:
* params: PTPParams*
* uint32_t *out
- *
+ *
* Switches the camera display to on and lets the user
- * select what to transfer. Sends a 0xc011 event when started
+ * select what to transfer. Sends a 0xc011 event when started
* and 0xc013 if direct transfer aborted.
*
* Return values: Some PTP_RC_* code.
@@ -2473,7 +2473,7 @@ ptp_canon_gettreeinfo (PTPParams* params, uint32_t *out)
* ptp_canon_getpairinginfo:
* params: PTPParams*
* int nr
- *
+ *
* Get the pairing information.
*
* Return values: Some PTP_RC_* code.
@@ -2483,7 +2483,7 @@ uint16_t
ptp_canon_getpairinginfo (PTPParams* params, uint32_t nr, unsigned char **data, unsigned int *size)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetPairingInfo, nr);
return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
@@ -2493,7 +2493,7 @@ ptp_canon_getpairinginfo (PTPParams* params, uint32_t nr, unsigned char **data,
* params: PTPParams*
* PTPCanon_directtransfer_entry **out
* unsigned int *outsize
- *
+ *
* Retrieves direct transfer entries specifying the images to transfer
* from the camera (to be retrieved after 0xc011 event).
*
@@ -2533,7 +2533,7 @@ exit:
/**
* ptp_canon_checkevent:
* params: PTPParams*
- *
+ *
* The camera has a FIFO stack, in which it accumulates events.
* Partially these events are communicated also via the USB interrupt pipe
* according to the PTP USB specification, partially not.
@@ -2541,7 +2541,7 @@ exit:
* if the event stack is empty, or filled with an event's data otherwise.
* The event is removed from the stack in the latter case.
* The Remote Capture app sends this command to the camera all the time
- * of connection, filling with it the gaps between other operations.
+ * of connection, filling with it the gaps between other operations.
*
* Return values: Some PTP_RC_* code.
* Upon success : PTPUSBEventContainer* event - is filled with the event data
@@ -2555,7 +2555,7 @@ ptp_canon_checkevent (PTPParams* params, PTPContainer* event, int* isevent)
PTPContainer ptp;
unsigned char *data = NULL;
unsigned int size;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_CheckEvent);
*isevent=0;
CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, &data, &size));
@@ -3029,7 +3029,7 @@ store_event:
handle_event_internal (params, &event);
-
+
}
if (ret == PTP_ERROR_TIMEOUT) /* ok, just new events */
ret = PTP_RC_OK;
@@ -3073,7 +3073,7 @@ ptp_get_one_event(PTPParams *params, PTPContainer *event)
/**
* ptp_canon_eos_getevent:
- *
+ *
* This retrieves configuration status/updates/changes
* on EOS cameras. It reads a datablock which has a list of variable
* sized structures.
@@ -3191,7 +3191,7 @@ uint16_t
ptp_canon_eos_getstorageinfo (PTPParams* params, uint32_t p1, unsigned char **data, unsigned int *size)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_EOS_GetStorageInfo, p1);
return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
/* FIXME: do stuff with data */
@@ -3270,14 +3270,14 @@ exit:
/**
* ptp_canon_eos_getpartialobject:
- *
+ *
* This retrieves a part of an PTP object which you specify as object id.
* The id originates from 0x9116 call.
* After finishing it, we seem to need to call ptp_canon_eos_enddirecttransfer.
*
* params: PTPParams*
* oid Object ID
- * offset The offset where to start the data transfer
+ * offset The offset where to start the data transfer
* xsize Size in bytes of the transfer to do
* data Pointer that receives the malloc()ed memory of the transfer.
*
@@ -3295,14 +3295,14 @@ ptp_canon_eos_getpartialobject (PTPParams* params, uint32_t oid, uint32_t offset
/**
* ptp_canon_eos_getpartialobjectex:
- *
+ *
* This retrieves a part of an PTP object which you specify as object id.
* The id originates from 0x9116 call.
* After finishing it, we seem to need to call ptp_canon_eos_enddirecttransfer.
*
* params: PTPParams*
* oid Object ID
- * offset The offset where to start the data transfer
+ * offset The offset where to start the data transfer
* xsize Size in bytes of the transfer to do
* data Pointer that receives the malloc()ed memory of the transfer.
*
@@ -3443,7 +3443,7 @@ ptp_canon_eos_setdevicepropvalue (PTPParams* params,
/**
* ptp_canon_getpartialobject:
*
- * This operation is used to read from the device a data
+ * This operation is used to read from the device a data
* block of an object from a specified offset.
*
* params: PTPParams*
@@ -3459,15 +3459,15 @@ ptp_canon_eos_setdevicepropvalue (PTPParams* params,
*
**/
uint16_t
-ptp_canon_getpartialobject (PTPParams* params, uint32_t handle,
+ptp_canon_getpartialobject (PTPParams* params, uint32_t handle,
uint32_t offset, uint32_t size,
- uint32_t pos, unsigned char** block,
+ uint32_t pos, unsigned char** block,
uint32_t* readnum)
{
PTPContainer ptp;
uint16_t ret;
unsigned char *data = NULL;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetPartialObjectEx, handle, offset, size, pos);
ret=ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, &data, NULL);
if (ret==PTP_RC_OK) {
@@ -3486,9 +3486,9 @@ ptp_canon_getpartialobject (PTPParams* params, uint32_t handle,
* Of course, prior to calling this operation, one must turn the viewfinder
* on with the CANON_ViewfinderOn command.
* Invoking this operation many times, one can get live video from the camera!
- *
+ *
* params: PTPParams*
- *
+ *
* Return values: Some PTP_RC_* code.
* char **image - the pointer to the read image
* unit32_t *size - the size of the image in bytes
@@ -3499,7 +3499,7 @@ ptp_canon_getviewfinderimage (PTPParams* params, unsigned char** image, uint32_t
{
PTPContainer ptp;
uint16_t ret;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetViewfinderImage);
ret=ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, image, NULL);
if (ret==PTP_RC_OK)
@@ -3511,14 +3511,14 @@ ptp_canon_getviewfinderimage (PTPParams* params, unsigned char** image, uint32_t
* ptp_canon_getchanges:
*
* This is an interesting operation, about the effect of which I am not sure.
- * This command is called every time when a device property has been changed
+ * This command is called every time when a device property has been changed
* with the SetDevicePropValue operation, and after some other operations.
* This operation reads the array of Device Properties which have been changed
* by the previous operation.
* Probably, this operation is even required to make those changes work.
*
* params: PTPParams*
- *
+ *
* Return values: Some PTP_RC_* code.
* uint16_t** props - the pointer to the array of changed properties
* uint32_t* propnum - the number of elements in the *props array
@@ -3530,7 +3530,7 @@ ptp_canon_getchanges (PTPParams* params, uint16_t** props, uint32_t* propnum)
PTPContainer ptp;
unsigned char *data = NULL;
unsigned int size;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetChanges);
CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, &data, &size));
*propnum=ptp_unpack_uint16_t_array(params,data,0,size,props);
@@ -3543,17 +3543,17 @@ ptp_canon_getchanges (PTPParams* params, uint16_t** props, uint32_t* propnum)
*
* This command reads a specified object's record in a device's filesystem,
* or the records of all objects belonging to a specified folder (association).
- *
+ *
* params: PTPParams*
* uint32_t store - StorageID,
* uint32_t p2 - Yet unknown (0 value works OK)
* uint32_t parent - Parent Object Handle
- * # If Parent Object Handle is 0xffffffff,
+ * # If Parent Object Handle is 0xffffffff,
* # the Parent Object is the top level folder.
* uint32_t handle - Object Handle
- * # If Object Handle is 0, the records of all objects
+ * # If Object Handle is 0, the records of all objects
* # belonging to the Parent Object are read.
- * # If Object Handle is not 0, only the record of this
+ * # If Object Handle is not 0, only the record of this
* # Object is read.
*
* Return values: Some PTP_RC_* code.
@@ -3562,15 +3562,15 @@ ptp_canon_getchanges (PTPParams* params, uint16_t** props, uint32_t* propnum)
*
**/
uint16_t
-ptp_canon_getobjectinfo (PTPParams* params, uint32_t store, uint32_t p2,
- uint32_t parent, uint32_t handle,
+ptp_canon_getobjectinfo (PTPParams* params, uint32_t store, uint32_t p2,
+ uint32_t parent, uint32_t handle,
PTPCANONFolderEntry** entries, uint32_t* entnum)
{
PTPContainer ptp;
uint16_t ret;
unsigned char *data = NULL;
unsigned int i, size;
-
+
*entnum = 0;
*entries = NULL;
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetObjectInfoEx, store, p2, parent, handle);
@@ -3614,7 +3614,7 @@ exit:
*
* The 'A' is the VolumeLabel from GetStorageInfo,
* my IXUS has "A" for the card and "V" for internal memory.
- *
+ *
* params: PTPParams*
* char* name - path name
*
@@ -3646,7 +3646,7 @@ ptp_canon_get_objecthandle_by_name (PTPParams* params, char* name, uint32_t* obj
*
* This command downloads the specified theme slot, including jpegs
* and wav files.
- *
+ *
* params: PTPParams*
* uint32_t themenr - nr of theme
*
@@ -3662,7 +3662,7 @@ ptp_canon_get_customize_data (PTPParams* params, uint32_t themenr,
PTPContainer ptp;
PTP_CNT_INIT(ptp, PTP_OC_CANON_GetCustomizeData, themenr);
- return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
+ return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
@@ -3672,14 +3672,14 @@ ptp_nikon_curve_download (PTPParams* params, unsigned char **data, unsigned int
PTPContainer ptp;
PTP_CNT_INIT(ptp, PTP_OC_NIKON_CurveDownload);
- return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
+ return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
/**
* ptp_sony_sdioconnect:
*
* This changes modes of the camera
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3701,7 +3701,7 @@ ptp_sony_sdioconnect (PTPParams* params, uint32_t p1, uint32_t p2, uint32_t p3)
* ptp_sony_qx_connect:
*
* This changes modes of the camera
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4222,7 +4222,7 @@ ptp_nikon_getfileinfoinblock ( PTPParams* params,
* ptp_nikon_get_liveview_image:
*
* This command gets a LiveView image from newer Nikons DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4232,7 +4232,7 @@ uint16_t
ptp_nikon_get_liveview_image (PTPParams* params, unsigned char **data, unsigned int *size)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_NIKON_GetLiveViewImg);
return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
@@ -4241,7 +4241,7 @@ ptp_nikon_get_liveview_image (PTPParams* params, unsigned char **data, unsigned
* ptp_nikon_get_preview_image:
*
* This command gets a Preview image from newer Nikons DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4293,7 +4293,7 @@ ptp_canon_eos_getremotemode (PTPParams* params, uint32_t *mode)
* ptp_canon_eos_get_viewfinder_image:
*
* This command gets a Viewfinder image from newer Nikons DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4303,7 +4303,7 @@ uint16_t
ptp_canon_eos_get_viewfinder_image (PTPParams* params, unsigned char **data, unsigned int *size)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_EOS_GetViewFinderData, 0x00100000 /* from trace */);
return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
@@ -4312,7 +4312,7 @@ uint16_t
ptp_canon_eos_get_viewfinder_image_handler (PTPParams* params, PTPDataHandler*handler)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_CANON_EOS_GetViewFinderData, 0x00100000 /* from trace */);
return ptp_transaction_new(params, &ptp, PTP_DP_GETDATA, 0, handler);
}
@@ -4321,7 +4321,7 @@ ptp_canon_eos_get_viewfinder_image_handler (PTPParams* params, PTPDataHandler*ha
* ptp_nikon_check_event:
*
* This command checks the event queue on the Nikon.
- *
+ *
* params: PTPParams*
* PTPUSBEventContainer **event - list of usb events.
* int *evtcnt - number of usb events in event structure.
@@ -4348,7 +4348,7 @@ ptp_nikon_check_event (PTPParams* params, PTPContainer** event, unsigned int* ev
* ptp_nikon_getptpipinfo:
*
* This command gets the ptpip info data.
- *
+ *
* params: PTPParams*
* unsigned char *data - data
* unsigned int size - size of returned data
@@ -4360,7 +4360,7 @@ uint16_t
ptp_nikon_getptpipinfo (PTPParams* params, unsigned char **data, unsigned int *size)
{
PTPContainer ptp;
-
+
PTP_CNT_INIT(ptp, PTP_OC_NIKON_GetDevicePTPIPInfo);
return ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, data, size);
}
@@ -4369,7 +4369,7 @@ ptp_nikon_getptpipinfo (PTPParams* params, unsigned char **data, unsigned int *s
* ptp_nikon_getwifiprofilelist:
*
* This command gets the wifi profile list.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4396,7 +4396,7 @@ ptp_nikon_getwifiprofilelist (PTPParams* params)
params->wifi_profiles_version = data[0];
params->wifi_profiles_number = data[1];
free(params->wifi_profiles);
-
+
params->wifi_profiles = malloc(params->wifi_profiles_number*sizeof(PTPNIKONWifiProfile));
memset(params->wifi_profiles, 0, params->wifi_profiles_number*sizeof(PTPNIKONWifiProfile));
@@ -4435,7 +4435,7 @@ ptp_nikon_getwifiprofilelist (PTPParams* params)
pos += (len*2+1);
if (pos+5 >= size)
goto exit;
-
+
n = dtoh32a(&data[pos]);
pos += 4;
if (pos+n >= size)
@@ -4472,7 +4472,7 @@ exit:
* ptp_nikon_writewifiprofile:
*
* This command gets the ptpip info data.
- *
+ *
* params: PTPParams*
* unsigned int profilenr - profile number
* unsigned char *data - data
@@ -4497,35 +4497,35 @@ ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* profile)
if (!params->wifi_profiles)
CHECK_PTP_RC(ptp_nikon_getwifiprofilelist(params));
-
+
for (i = 0; i < params->wifi_profiles_number; i++) {
if (!params->wifi_profiles[i].valid) {
profilenr = params->wifi_profiles[i].id;
break;
}
}
-
+
if (profilenr == -1) {
/* No free profile! */
return PTP_RC_StoreFull;
}
-
+
memset(buffer, 0, 1024);
-
+
buffer[0x00] = 0x64; /* Version */
-
+
/* Profile name */
htod32a(&buffer[0x01], 17);
/* 16 as third parameter, so there will always be a null-byte in the end */
strncpy((char*)&buffer[0x05], profile->profile_name, 16);
-
+
buffer[0x16] = 0x00; /* Display order */
buffer[0x17] = profile->device_type;
buffer[0x18] = profile->icon_type;
-
+
/* FIXME: Creation date: put a real date here */
ptp_pack_string(params, "19990909T090909", data, 0x19, &len);
-
+
/* IP parameters */
memcpy(&buffer[0x3A],&profile->ip_address,sizeof(profile->ip_address));
/**((unsigned int*)&buffer[0x3A]) = profile->ip_address; *//* Do not reverse bytes */
@@ -4533,15 +4533,15 @@ ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* profile)
memcpy(&buffer[0x3F],&profile->gateway_address,sizeof(profile->gateway_address));
/**((unsigned int*)&buffer[0x3F]) = profile->gateway_address; */ /* Do not reverse bytes */
buffer[0x43] = profile->address_mode;
-
+
/* Wifi parameters */
buffer[0x44] = profile->access_mode;
buffer[0x45] = profile->wifi_channel;
-
+
htod32a(&buffer[0x46], 33); /* essid */
/* 32 as third parameter, so there will always be a null-byte in the end */
strncpy((char*)&buffer[0x4A], profile->essid, 32);
-
+
buffer[0x6B] = profile->authentification;
buffer[0x6C] = profile->encryption;
htod32a(&buffer[0x6D], 64);
@@ -4550,7 +4550,7 @@ ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* profile)
}
buffer[0xB1] = profile->key_nr;
memcpy(&buffer[0xB2], guid, 16);
-
+
switch(profile->encryption) {
case 1: /* WEP 64bit */
htod16a(&buffer[0xC2], 5); /* (64-24)/8 = 5 */
@@ -4562,7 +4562,7 @@ ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* profile)
htod16a(&buffer[0xC2], 0);
}
size = 0xC4;
-
+
PTP_CNT_INIT(ptp, PTP_OC_NIKON_SendProfileData, profilenr);
return ptp_transaction(params, &ptp, PTP_DP_SENDDATA, size, &data, NULL);
}
@@ -4571,7 +4571,7 @@ ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* profile)
* ptp_mtp_getobjectpropssupported:
*
* This command gets the object properties possible from the device.
- *
+ *
* params: PTPParams*
* uint ofc - object format code
* unsigned int *propnum - number of elements in returned array
@@ -4600,7 +4600,7 @@ ptp_mtp_getobjectpropssupported (PTPParams* params, uint16_t ofc,
* ptp_mtp_getobjectpropdesc:
*
* This command gets the object property description.
- *
+ *
* params: PTPParams*
* uint16_t opc - object property code
* uint16_t ofc - object format code
@@ -4627,7 +4627,7 @@ ptp_mtp_getobjectpropdesc (
* ptp_mtp_getobjectpropvalue:
*
* This command gets the object properties of an object handle.
- *
+ *
* params: PTPParams*
* uint32_t objectid - object format code
* uint16_t opc - object prop code
@@ -4644,7 +4644,7 @@ ptp_mtp_getobjectpropvalue (
uint16_t ret = PTP_RC_OK;
unsigned char *data = NULL;
unsigned int size, offset = 0;
-
+
PTP_CNT_INIT(ptp, PTP_OC_MTP_GetObjectPropValue, oid, opc);
CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_GETDATA, 0, &data, &size));
if (!ptp_unpack_DPV(params, data, &offset, size, value, datatype)) {
@@ -4659,7 +4659,7 @@ ptp_mtp_getobjectpropvalue (
* ptp_mtp_setobjectpropvalue:
*
* This command gets the object properties of an object handle.
- *
+ *
* params: PTPParams*
* uint32_t objectid - object format code
* uint16_t opc - object prop code
@@ -4779,7 +4779,7 @@ ptp_mtp_sendobjectproplist (PTPParams* params, uint32_t* store, uint32_t* parent
free(data);
*store = ptp.Param1;
*parenthandle = ptp.Param2;
- *handle = ptp.Param3;
+ *handle = ptp.Param3;
return ret;
}
@@ -5162,7 +5162,7 @@ ptp_fuji_getevents (PTPParams* params, uint16_t** events, uint16_t* count)
}
}
free(data);
- return PTP_RC_OK;
+ return PTP_RC_OK;
}
@@ -6343,7 +6343,7 @@ _value_to_num(PTPPropertyValue *data, uint16_t dt) {
return 0;
} else {
switch (dt) {
- case PTP_DTC_UNDEF:
+ case PTP_DTC_UNDEF:
return 0;
case PTP_DTC_INT8:
return data->i8;
@@ -6358,10 +6358,10 @@ _value_to_num(PTPPropertyValue *data, uint16_t dt) {
case PTP_DTC_UINT32:
return data->u32;
/*
- PTP_DTC_INT64
- PTP_DTC_UINT64
- PTP_DTC_INT128
- PTP_DTC_UINT128
+ PTP_DTC_INT64
+ PTP_DTC_UINT64
+ PTP_DTC_INT128
+ PTP_DTC_UINT128
*/
default:
return 0;
@@ -6994,13 +6994,13 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{0, 0, 0, NULL}
};
for (i=0; ptp_value_trans[i].dpc!=0; i++) {
- if ((ptp_value_trans[i].dpc == dpc) &&
+ if ((ptp_value_trans[i].dpc == dpc) &&
(((ptp_value_trans[i].dpc & 0xf000) == 0x5000) ||
(ptp_value_trans[i].vendor == params->deviceinfo.VendorExtensionID))
) {
double value = _value_to_num(&(dpd->CurrentValue), dpd->DataType);
- return snprintf(out, length,
+ return snprintf(out, length,
_(ptp_value_trans[i].format),
value * ptp_value_trans[i].coef +
ptp_value_trans[i].bias);
@@ -7009,7 +7009,7 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
kval = _value_to_num(&(dpd->CurrentValue), dpd->DataType);
for (i=0; ptp_value_list[i].dpc!=0; i++) {
- if ((ptp_value_list[i].dpc == dpc) &&
+ if ((ptp_value_list[i].dpc == dpc) &&
(((ptp_value_list[i].dpc & 0xf000) == 0x5000) ||
(ptp_value_list[i].vendor == params->deviceinfo.VendorExtensionID)) &&
(ptp_value_list[i].key==kval)
@@ -7186,7 +7186,7 @@ ptp_render_ofc(PTPParams* params, uint16_t ofc, int spaceleft, char *txt)
}
break;
case PTP_VENDOR_MICROSOFT:
- case PTP_VENDOR_MTP:
+ case PTP_VENDOR_MTP:
for (i=0;i<sizeof(ptp_ofc_mtp_trans)/sizeof(ptp_ofc_mtp_trans[0]);i++)
if (ofc == ptp_ofc_mtp_trans[i].ofc)
return snprintf(txt, spaceleft, "%s", _(ptp_ofc_mtp_trans[i].format));
@@ -7975,18 +7975,18 @@ ptp_get_new_object_prop_entry(MTPProperties **props, int *nrofprops)
prop->datatype = PTP_DTC_UNDEF;
prop->ObjectHandle = 0x00000000U;
prop->propval.str = NULL;
-
+
(*props) = newprops;
(*nrofprops)++;
return prop;
}
-void
+void
ptp_destroy_object_prop(MTPProperties *prop)
{
if (!prop)
return;
-
+
if (prop->datatype == PTP_DTC_STR && prop->propval.str != NULL)
free(prop->propval.str);
else if ((prop->datatype == PTP_DTC_AINT8 || prop->datatype == PTP_DTC_AINT16 ||
@@ -7997,7 +7997,7 @@ ptp_destroy_object_prop(MTPProperties *prop)
free(prop->propval.a.v);
}
-void
+void
ptp_destroy_object_prop_list(MTPProperties *props, int nrofprops)
{
int i;
@@ -8063,7 +8063,7 @@ static int _cmp_ob (const void *a, const void *b)
if (oa->oid < ob->oid) return -1;
return 0;
}
-
+
void
ptp_objects_sort (PTPParams *params)
{
@@ -8171,7 +8171,7 @@ ptp_object_want (PTPParams *params, uint32_t handle, unsigned int want, PTPObjec
#define X (PTPOBJECT_OBJECTINFO_LOADED|PTPOBJECT_STORAGEID_LOADED|PTPOBJECT_PARENTOBJECT_LOADED)
if ((want & X) && ((ob->flags & X) != X)) {
uint32_t saveparent = 0;
-
+
/* One EOS issue, where getobjecthandles(root) returns obs without root flag. */
if (ob->flags & PTPOBJECT_PARENTOBJECT_LOADED)
saveparent = ob->oi.ParentObject;
@@ -8306,7 +8306,7 @@ ptp_object_want (PTPParams *params, uint32_t handle, unsigned int want, PTPObjec
#if 0
MTPProperties *xpl;
int j;
- PTPObjectInfo oinfo;
+ PTPObjectInfo oinfo;
memset (&oinfo,0,sizeof(oinfo));
/* hmm, not necessary ... only if we would use it */
diff --git a/camlibs/ptp2/ptp.h b/camlibs/ptp2/ptp.h
index 90babb554..8437616eb 100644
--- a/camlibs/ptp2/ptp.h
+++ b/camlibs/ptp2/ptp.h
@@ -99,7 +99,7 @@ struct _PTPUSBBulkContainer {
uint32_t param4;
uint32_t param5;
} params;
- /* this must be set to the maximum of PTP_USB_BULK_PAYLOAD_LEN_WRITE
+ /* this must be set to the maximum of PTP_USB_BULK_PAYLOAD_LEN_WRITE
* and PTP_USB_BULK_PAYLOAD_LEN_READ */
unsigned char data[PTP_USB_BULK_PAYLOAD_LEN_READ];
} payload;
@@ -178,7 +178,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_VENDOR_SONY 0x00000011 /* observed in the A900 */
/* Vendor extension ID used for MTP (occasionally, usually 6 is used) */
-#define PTP_VENDOR_MTP 0xffffffff
+#define PTP_VENDOR_MTP 0xffffffff
/* gphoto overrides */
#define PTP_VENDOR_GP_OLYMPUS 0x0000fffe
@@ -295,7 +295,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_CANON_GetMACAddress 0x9033 /* no args */
/*
0000 12 00 00 00 02 00 33 90-1a 00 00 00 2c 9e fc c8 ......3.....,...
-0010 33 e3 - 3.
+0010 33 e3 - 3.
*/
/* 9034: 1 param, no parms returned */
@@ -306,7 +306,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_CANON_GetWebServiceSpec 0x9068 /* no args */
/* data returned:
0000 1e 00 00 00 02 00 68 90-1a 00 00 00 00 01 08 00 ......h.........
-0010 14 00 bc ce 00 00 78 00-78 00 00 14 00 00 ......x.x.....
+0010 14 00 bc ce 00 00 78 00-78 00 00 14 00 00 ......x.x.....
*/
#define PTP_OC_CANON_GetWebServiceData 0x9069 /* no args */
@@ -355,7 +355,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
00000030: 00 00 00 30 44 43 49 4d 00 00 00 00 00 00 00 00 DCIM
00000040: 00 00 00 00 cc c3 01 46
* 2 respargs: 0x0, 0x3c
- *
+ *
* sample2:
*
00000000: 18 00 00 00 01 00 09 91 15 00 00 00 01 00 00 00
@@ -377,11 +377,11 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* 910f: no args, no data, 1 response arg (0). */
#define PTP_OC_CANON_EOS_RemoteRelease 0x910F
-/* Marcus: looks more like "Set DeviceProperty" in the trace.
+/* Marcus: looks more like "Set DeviceProperty" in the trace.
*
* no cmd args
* data phase (0xc, 0xd11c, 0x1)
- * no resp args
+ * no resp args
*/
#define PTP_OC_CANON_EOS_SetDevicePropValueEx 0x9110
#define PTP_OC_CANON_EOS_GetRemoteMode 0x9113
@@ -632,12 +632,12 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* 9201:
* 3 params: 1,0,0 ; IN: data 8 bytes all 0
* or:
- * 3 params: 2,0,0 ; IN: data 8 bytes all 0
+ * 3 params: 2,0,0 ; IN: data 8 bytes all 0
* or
* 3 params: 3,0,0,: IN: data 8 butes all 0
*/
#define PTP_OC_SONY_SDIOConnect 0x9201
-/* 9202: 1 param, 0xc8; IN data:
+/* 9202: 1 param, 0xc8; IN data:
* 16 bit: 0xc8
* ptp array 32 bit: index, 16 bit values of propcodes */
#define PTP_OC_SONY_GetSDIOGetExtDeviceInfo 0x9202
@@ -674,7 +674,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_MTP_Skip 0x9820
/*
- * Windows Media Digital Rights Management for Portable Devices
+ * Windows Media Digital Rights Management for Portable Devices
* Extension Codes (microsoft.com/WMDRMPD: 10.1)
*/
#define PTP_OC_MTP_WMDRMPD_GetSecureTimeChallenge 0x9101
@@ -689,10 +689,10 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_MTP_WMDRMPD_SendWMDRMPDCommand 0x910A
#define PTP_OC_MTP_WMDRMPD_SendWMDRMPDRequest 0x910B
-/*
- * Windows Media Digital Rights Management for Portable Devices
+/*
+ * Windows Media Digital Rights Management for Portable Devices
* Extension Codes (microsoft.com/WMDRMPD: 10.1)
- * Below are operations that have no public documented identifier
+ * Below are operations that have no public documented identifier
* associated with them "Vendor-defined Command Code"
*/
#define PTP_OC_MTP_WMDRMPD_SendWMDRMPDAppRequest 0x9212
@@ -703,7 +703,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* ^^^ guess ^^^ */
/*
- * Microsoft Advanced Audio/Video Transfer
+ * Microsoft Advanced Audio/Video Transfer
* Extensions (microsoft.com/AAVT: 1.0)
*/
#define PTP_OC_MTP_AAVT_OpenMediaSession 0x9170
@@ -712,7 +712,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_MTP_AAVT_SetCurrentTimePosition 0x9173
/*
- * Windows Media Digital Rights Management for Network Devices
+ * Windows Media Digital Rights Management for Network Devices
* Extensions (microsoft.com/WMDRMND: 1.0) MTP/IP?
*/
#define PTP_OC_MTP_WMDRMND_SendRegistrationRequest 0x9180
@@ -722,8 +722,8 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_MTP_WMDRMND_SendWMDRMNDLicenseRequest 0x9184
#define PTP_OC_MTP_WMDRMND_GetWMDRMNDLicenseResponse 0x9185
-/*
- * Windows Media Player Portiable Devices
+/*
+ * Windows Media Player Portiable Devices
* Extension Codes (microsoft.com/WMPPD: 11.1)
*/
#define PTP_OC_MTP_WMPPD_ReportAddedDeletedItems 0x9201
@@ -731,7 +731,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_MTP_WMPPD_PlaylistObjectPref 0x9203
/*
- * Undocumented Zune Operation Codes
+ * Undocumented Zune Operation Codes
* maybe related to WMPPD extension set?
*/
#define PTP_OC_MTP_ZUNE_GETUNDEFINED001 0x9204
@@ -750,7 +750,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* 9482: Set One Touch WB Gain */
/* 9483: Set / Start Magnifying Live View Point */
/* 9488: Change Magnifying Live View Area */
-/* 9493: Start Driving Zoom Lens For Direction / Focal Length / Stop Driving zoom
+/* 9493: Start Driving Zoom Lens For Direction / Focal Length / Stop Driving zoom
* start direction: x1=1,x2=0,x3= STEPS?, x4=1 or 2 (near / far ? )
* start to focallength: x1=1,x2=3,x3= VALUE? ,x4=4 (potentially more)
* stop: x1=2,x2=0,x3=0,x4=0
@@ -895,7 +895,7 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* 9104 gets this data:
0000 24 00 00 00 02 00 04 91-04 00 00 00 01 00 01 00 $...............
0010 01 00 e1 07 10 00 00 00-00 00 00 00 00 00 00 00 ................
-0020 00 00 00 00 - ....
+0020 00 00 00 00 - ....
*/
#define PTP_OC_PANASONIC_9107 0x9107 /* getsize? */
@@ -1083,9 +1083,9 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_RC_MTP_Object_Too_Large 0xA809
#define PTP_RC_MTP_ObjectProp_Not_Supported 0xA80A
-/* Microsoft Advanced Audio/Video Transfer response codes
+/* Microsoft Advanced Audio/Video Transfer response codes
(microsoft.com/AAVT 1.0) */
-#define PTP_RC_MTP_Invalid_Media_Session_ID 0xA170
+#define PTP_RC_MTP_Invalid_Media_Session_ID 0xA170
#define PTP_RC_MTP_Media_Session_Limit_Reached 0xA171
#define PTP_RC_MTP_No_More_Data 0xA172
@@ -1671,7 +1671,7 @@ struct _PTPNIKONWifiProfile {
uint8_t display_order;
char creation_date[16];
char lastusage_date[16];
-
+
/* Values only valid when writing */
uint32_t ip_address;
uint8_t subnet_mask; /* first zero bit position, e.g. 24 for 255.255.255.0 */
@@ -2790,7 +2790,7 @@ typedef struct _PTPCanonEOSDeviceInfo {
/* Casio EX-F1 */
-#define PTP_DPC_CASIO_MONITOR 0xD001
+#define PTP_DPC_CASIO_MONITOR 0xD001
#define PTP_DPC_CASIO_STORAGE 0xD002 //Not reported by DeviceInfo?
#define PTP_DPC_CASIO_UNKNOWN_1 0xD004
#define PTP_DPC_CASIO_UNKNOWN_2 0xD005
@@ -2872,7 +2872,7 @@ typedef struct _PTPCanonEOSDeviceInfo {
0020 00 08 02 00 00 00 00 00-13 00 00 08 02 00 00 00 ................
0030 00 00 14 00 00 08 04 00-00 00 00 00 00 00 15 00 ................
0040 00 08 04 00 00 00 00 00-00 00 16 00 00 08 02 00 ................
-0050 00 00 01 00 - ....
+0050 00 00 01 00 - ....
0000 d0 00 00 00 02 00 07 91-04 00 00 00 10 00 00 08 ................
0010 14 00 00 00 14 00 00 00-01 00 01 00 00 00 00 00 ................
@@ -2891,17 +2891,17 @@ typedef struct _PTPCanonEOSDeviceInfo {
#define PTP_DPC_PANASONIC_08000091 0x08000091 /* SetupFilesConfig_Set_Target */
/*
0000 16 00 00 00 02 00 0a 94-04 00 00 00 91 00 00 08 ................
-0010 02 00 00 00 00 00 - ......
+0010 02 00 00 00 00 00 - ......
0000 44 00 00 00 02 00 07 91-04 00 00 00 90 00 00 08 D...............
0010 14 00 00 00 14 00 00 00-01 00 01 00 00 00 00 00 ................
0020 01 00 00 00 48 00 00 00-91 00 00 08 14 00 00 00 ....H...........
0030 14 00 00 00 01 00 01 00-00 00 00 00 01 00 00 00 ................
-0040 2c 00 00 00 - ,...
+0040 2c 00 00 00 - ,...
*/
#define PTP_DPC_PANASONIC_GetFreeSpaceInImages 0x12000010
-/*
+/*
0000 98 00 00 00 02 00 14 94-04 00 00 00 11 00 00 12 ................
0010 04 00 00 00 4e 00 00 00-12 00 00 12 04 00 00 00 ....N...........
0020 00 00 00 00 13 00 00 12-02 00 00 00 00 00 14 00 ................
@@ -2911,12 +2911,12 @@ typedef struct _PTPCanonEOSDeviceInfo {
0060 ff ff 00 00 00 00 ff ff-ff ff 00 00 00 00 00 00 ................
0070 00 00 00 00 00 00 ff ff-ff ff 00 00 00 00 ff ff ................
0080 ff ff 00 00 00 00 00 00-00 00 17 00 00 12 06 00 ................
-0090 00 00 00 00 00 00 00 00- ........
+0090 00 00 00 00 00 00 00 00- ........
*/
#define PTP_DPC_PANASONIC_GetBatteryInfo 0x16000010
-/*
+/*
0000 1c 00 00 00 02 00 14 94-04 00 00 00 11 00 00 16 ................
-0010 08 00 00 00 4b 00 00 00-4b 00 ff ff ....K...K...
+0010 08 00 00 00 4b 00 00 00-4b 00 ff ff ....K...K...
*/
#define PTP_DPC_PANASONIC_LensGetMFBar 0x12010040
/* 15c00010 GetSetupInfo Error */
@@ -3336,7 +3336,7 @@ uint16_t ptp_usb_sendreq (PTPParams* params, PTPContainer* req, int dataphase);
uint16_t ptp_usb_senddata (PTPParams* params, PTPContainer* ptp,
uint64_t size, PTPDataHandler *handler);
uint16_t ptp_usb_getresp (PTPParams* params, PTPContainer* resp);
-uint16_t ptp_usb_getdata (PTPParams* params, PTPContainer* ptp,
+uint16_t ptp_usb_getdata (PTPParams* params, PTPContainer* ptp,
PTPDataHandler *handler);
uint16_t ptp_usb_event_async (PTPParams *params, PTPEventCbFn cb, void *user_data);
uint16_t ptp_usb_event_wait (PTPParams* params, PTPContainer* event);
@@ -3355,7 +3355,7 @@ uint16_t ptp_ptpip_sendreq (PTPParams* params, PTPContainer* req, int dataphase)
uint16_t ptp_ptpip_senddata (PTPParams* params, PTPContainer* ptp,
uint64_t size, PTPDataHandler *handler);
uint16_t ptp_ptpip_getresp (PTPParams* params, PTPContainer* resp);
-uint16_t ptp_ptpip_getdata (PTPParams* params, PTPContainer* ptp,
+uint16_t ptp_ptpip_getdata (PTPParams* params, PTPContainer* ptp,
PTPDataHandler *handler);
uint16_t ptp_ptpip_event_wait (PTPParams* params, PTPContainer* event);
uint16_t ptp_ptpip_event_check (PTPParams* params, PTPContainer* event);
@@ -3367,7 +3367,7 @@ uint16_t ptp_generic_no_data (PTPParams* params, uint16_t opcode, unsigned int c
uint16_t ptp_opensession (PTPParams *params, uint32_t session);
-uint16_t ptp_transaction_new (PTPParams* params, PTPContainer* ptp,
+uint16_t ptp_transaction_new (PTPParams* params, PTPContainer* ptp,
uint16_t flags, uint64_t sendlen,
PTPDataHandler *handler
);
@@ -3398,7 +3398,7 @@ uint16_t ptp_transaction (PTPParams* params, PTPContainer* ptp,
/**
* ptp_resetdevice:
* params: PTPParams*
- *
+ *
* Uses the built-in function to reset the device
*
* Return values: Some PTP_RC_* code.
@@ -3465,7 +3465,7 @@ uint16_t ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
* ptp_setobjectprotection:
* params: PTPParams*
* uint16_t newprot - object protection flag
- *
+ *
* Set protection of object.
*
* Return values: Some PTP_RC_* code.
@@ -3481,7 +3481,7 @@ uint16_t ptp_sendobject_from_handler (PTPParams* params, PTPDataHandler*, uint6
* params: PTPParams*
* storageid - destination StorageID on Responder
* ofc - object format code
- *
+ *
* Causes device to initiate the capture of one or more new data objects
* according to its current device properties, storing the data into store
* indicated by storageid. If storageid is 0x00000000, the object(s) will
@@ -3524,7 +3524,7 @@ int ptp_get_one_eos_event (PTPParams *params, PTPCanon_changes_entry *entry);
/* Microsoft MTP extensions */
uint16_t ptp_mtp_getobjectpropdesc (PTPParams* params, uint16_t opc, uint16_t ofc,
PTPObjectPropDesc *objectpropertydesc);
-uint16_t ptp_mtp_getobjectpropvalue (PTPParams* params, uint32_t oid, uint16_t opc,
+uint16_t ptp_mtp_getobjectpropvalue (PTPParams* params, uint32_t oid, uint16_t opc,
PTPPropertyValue *value, uint16_t datatype);
uint16_t ptp_mtp_setobjectpropvalue (PTPParams* params, uint32_t oid, uint16_t opc,
PTPPropertyValue *value, uint16_t datatype);
@@ -3572,7 +3572,7 @@ uint16_t ptp_canon_get_mac_address (PTPParams* params, unsigned char **mac);
/**
* ptp_canon_startshootingmode:
* params: PTPParams*
- *
+ *
* Starts shooting session. It emits a StorageInfoChanged
* event via the interrupt pipe and pushes the StorageInfoChanged
* and CANON_CameraModeChange events onto the event stack
@@ -3585,9 +3585,9 @@ uint16_t ptp_canon_get_mac_address (PTPParams* params, unsigned char **mac);
/**
* ptp_canon_endshootingmode:
* params: PTPParams*
- *
- * This operation is observed after pressing the Disconnect
- * button on the Remote Capture app. It emits a StorageInfoChanged
+ *
+ * This operation is observed after pressing the Disconnect
+ * button on the Remote Capture app. It emits a StorageInfoChanged
* event via the interrupt pipe and pushes the StorageInfoChanged
* and CANON_CameraModeChange events onto the event stack
* (see operation PTP_OC_CANON_CheckEvent).
@@ -3599,7 +3599,7 @@ uint16_t ptp_canon_get_mac_address (PTPParams* params, unsigned char **mac);
/**
* ptp_canon_viewfinderon:
* params: PTPParams*
- *
+ *
* Prior to start reading viewfinder images, one must call this operation.
* Supposedly, this operation affects the value of the CANON_ViewfinderMode
* property.
@@ -3611,7 +3611,7 @@ uint16_t ptp_canon_get_mac_address (PTPParams* params, unsigned char **mac);
/**
* ptp_canon_viewfinderoff:
* params: PTPParams*
- *
+ *
* Before changing the shooting mode, or when one doesn't need to read
* viewfinder images any more, one must call this operation.
* Supposedly, this operation affects the value of the CANON_ViewfinderMode
@@ -3628,7 +3628,7 @@ uint16_t ptp_canon_get_mac_address (PTPParams* params, unsigned char **mac);
* 1 - autoexposure
* 2 - autofocus
* 4 - autowhitebalance
- *
+ *
* Called "Reset AeAfAwb" (auto exposure, focus, white balance)
*
* Return values: Some PTP_RC_* code.
@@ -3637,14 +3637,14 @@ uint16_t ptp_canon_get_mac_address (PTPParams* params, unsigned char **mac);
#define PTP_CANON_RESET_AF 0x2
#define PTP_CANON_RESET_AWB 0x4
#define ptp_canon_reset_aeafawb(params,flags) ptp_generic_no_data(params,PTP_OC_CANON_DoAeAfAwb,1,flags)
-uint16_t ptp_canon_checkevent (PTPParams* params,
+uint16_t ptp_canon_checkevent (PTPParams* params,
PTPContainer* event, int* isevent);
/**
* ptp_canon_focuslock:
*
* This operation locks the focus. It is followed by the CANON_GetChanges(?)
- * operation in the log.
- * It affects the CANON_MacroMode property.
+ * operation in the log.
+ * It affects the CANON_MacroMode property.
*
* params: PTPParams*
*
@@ -3656,9 +3656,9 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
* ptp_canon_focusunlock:
*
* This operation unlocks the focus. It is followed by the CANON_GetChanges(?)
- * operation in the log.
+ * operation in the log.
* It sets the CANON_MacroMode property value to 1 (where it occurs in the log).
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3669,7 +3669,7 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
* ptp_canon_keepdeviceon:
*
* This operation sends a "ping" style message to the camera.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3680,7 +3680,7 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
* ptp_canon_eos_keepdeviceon:
*
* This operation sends a "ping" style message to the camera.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3692,7 +3692,7 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
* ptp_canon_eos_popupflash:
*
* This operation pops up the builtin flash of the Canon EOS.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3701,7 +3701,7 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
#define ptp_canon_eos_popupflash(params) ptp_generic_no_data(params,PTP_OC_CANON_EOS_PopupBuiltinFlash,0)
/**
* ptp_canon_initiatecaptureinmemory:
- *
+ *
* This operation starts the image capture according to the current camera
* settings. When the capture has happened, the camera emits a CaptureComplete
* event via the interrupt pipe and pushes the CANON_RequestObjectTransfer,
@@ -3721,7 +3721,7 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
* ptp_canon_eos_requestdevicepropvalue:
*
* This operation sends a "ping" style message to the camera.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3738,17 +3738,17 @@ uint16_t ptp_canon_checkevent (PTPParams* params,
uint16_t ptp_canon_eos_getremotemode (PTPParams*, uint32_t *);
uint16_t ptp_canon_eos_capture (PTPParams* params, uint32_t *result);
uint16_t ptp_canon_eos_getevent (PTPParams* params, PTPCanon_changes_entry **entries, int *nrofentries);
-uint16_t ptp_canon_getpartialobject (PTPParams* params, uint32_t handle,
+uint16_t ptp_canon_getpartialobject (PTPParams* params, uint32_t handle,
uint32_t offset, uint32_t size,
- uint32_t pos, unsigned char** block,
+ uint32_t pos, unsigned char** block,
uint32_t* readnum);
uint16_t ptp_canon_getviewfinderimage (PTPParams* params, unsigned char** image,
uint32_t* size);
uint16_t ptp_canon_getchanges (PTPParams* params, uint16_t** props,
- uint32_t* propnum);
+ uint32_t* propnum);
uint16_t ptp_canon_getobjectinfo (PTPParams* params, uint32_t store,
uint32_t p2, uint32_t parenthandle,
- uint32_t handle,
+ uint32_t handle,
PTPCANONFolderEntry** entries,
uint32_t* entnum);
uint16_t ptp_canon_eos_getdeviceinfo (PTPParams* params, PTPCanonEOSDeviceInfo*di);
@@ -3756,7 +3756,7 @@ uint16_t ptp_canon_eos_getdeviceinfo (PTPParams* params, PTPCanonEOSDeviceInfo*d
* ptp_canon_eos_setuilock:
*
* This command sets UI lock
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3767,7 +3767,7 @@ uint16_t ptp_canon_eos_getdeviceinfo (PTPParams* params, PTPCanonEOSDeviceInfo*d
* ptp_canon_eos_resetuilock:
*
* This command sets UI lock
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3778,7 +3778,7 @@ uint16_t ptp_canon_eos_getdeviceinfo (PTPParams* params, PTPCanonEOSDeviceInfo*d
* ptp_canon_eos_start_viewfinder:
*
* This command starts Viewfinder mode of newer Canon DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3789,7 +3789,7 @@ uint16_t ptp_canon_eos_getdeviceinfo (PTPParams* params, PTPCanonEOSDeviceInfo*d
* ptp_canon_eos_end_viewfinder:
*
* This command ends Viewfinder mode of newer Canon DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3827,7 +3827,7 @@ uint16_t ptp_canon_eos_setdevicepropvalueex (PTPParams* params, unsigned char* d
#define ptp_canon_eos_seteventmode(params,p1) ptp_generic_no_data(params,PTP_OC_CANON_EOS_SetEventMode,1,p1)
/**
* ptp_canon_eos_transfercomplete:
- *
+ *
* This ends a direct object transfer from an EOS camera.
*
* params: PTPParams*
@@ -3847,7 +3847,7 @@ uint16_t ptp_canon_eos_getdevicepropdesc (PTPParams* params, uint16_t propcode,
uint16_t ptp_canon_eos_setdevicepropvalue (PTPParams* params, uint16_t propcode,
PTPPropertyValue* value, uint16_t datatype);
uint16_t ptp_nikon_get_vendorpropcodes (PTPParams* params, uint16_t **props, unsigned int *size);
-uint16_t ptp_nikon_curve_download (PTPParams* params,
+uint16_t ptp_nikon_curve_download (PTPParams* params,
unsigned char **data, unsigned int *size);
uint16_t ptp_nikon_getlargethumb (PTPParams *params, uint32_t handle,
unsigned char** object, unsigned int *len);
@@ -3877,7 +3877,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_deletewifiprofile:
*
* This command deletes a wifi profile.
- *
+ *
* params: PTPParams*
* unsigned int profilenr - profile number
*
@@ -3889,7 +3889,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_changecameramode:
*
* This command can switch the camera to full PC control mode.
- *
+ *
* params: PTPParams*
* uint32_t mode - mode
*
@@ -3901,10 +3901,10 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_terminatecapture:
*
* This command appears to terminate a longer capture
- *
+ *
* params: PTPParams*
- * uint32_t a
- * uint32_t b
+ * uint32_t a
+ * uint32_t b
*
* Return values: Some PTP_RC_* code.
*
@@ -3914,7 +3914,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_afdrive:
*
* This command runs (drives) the lens autofocus.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3925,7 +3925,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_changeafarea:
*
* This command starts movie capture (to card)
- *
+ *
* params: PTPParams*
* x: x coordinate
* y: y coordinate
@@ -3938,7 +3938,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_startmovie:
*
* This command starts movie capture (to card)
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3949,7 +3949,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_stopmovie:
*
* This command stops movie capture (to card)
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3960,7 +3960,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_canon_eos_afdrive:
*
* This command runs (drives) the lens autofocus.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3971,7 +3971,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_canon_eos_afcancel:
*
* This command cancels the lens autofocus.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -3982,7 +3982,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_canon_eos_zoom:
*
* This command runs (drives) the lens autofocus.
- *
+ *
* params: PTPParams*
* params: arg1 unknown
*
@@ -3998,7 +3998,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_mfdrive:
*
* This command runs (drives) the lens focus manually.
- *
+ *
* params: PTPParams*
* flag: 0x1 for (no limit - closest), 0x2 for (closest - no limit)
* amount: amount of steps
@@ -4012,7 +4012,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_canon_eos_drivelens:
*
* This command runs (drives) the lens focus manually.
- *
+ *
* params: PTPParams*
* amount: 0x1-0x3 for near range, 0x8001-0x8003 for far range.
*
@@ -4024,7 +4024,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_capture:
*
* This command captures a picture on the Nikon.
- *
+ *
* params: PTPParams*
* uint32_t x: unknown parameter. seen to be -1.
*
@@ -4037,7 +4037,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_capture2:
*
* This command captures a picture on the Nikon.
- *
+ *
* params: PTPParams*
* af: autofocus before capture (1 yes , 0 no)
* target: sdram 1, card 0
@@ -4052,7 +4052,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_capture_sdram:
*
* This command captures a picture on the Nikon.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4063,7 +4063,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_delete_sdram_image:
*
* This command deletes the current SDRAM image
- *
+ *
* params: PTPParams*
* uint32_t oid
*
@@ -4075,7 +4075,7 @@ uint16_t ptp_sony_9281 (PTPParams* params, uint32_t param1);
* ptp_nikon_start_liveview:
*
* This command starts LiveView mode of newer Nikons DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4088,7 +4088,7 @@ uint16_t ptp_nikon_get_preview_image (PTPParams* params, unsigned char**, unsign
* ptp_nikon_end_liveview:
*
* This command ends LiveView mode of newer Nikons DSLRs.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4103,7 +4103,7 @@ uint16_t ptp_nikon_getfileinfoinblock (PTPParams* params, uint32_t p1, uint32_t
*
* This command checks if the device is ready. Used after
* a capture.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -4193,7 +4193,7 @@ typedef struct tagptp_chdk_videosettings {
long bitmap_buffer_width;
long bitmap_width;
long bitmap_height;
- unsigned palette[16];
+ unsigned palette[16];
} ptp_chdk_videosettings;
/* Nafraf: Test this!!!*/
diff --git a/camlibs/ptp2/ptpip.c b/camlibs/ptp2/ptpip.c
index 7a6492ccf..c4f1bc9c2 100644
--- a/camlibs/ptp2/ptpip.c
+++ b/camlibs/ptp2/ptpip.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -20,7 +20,7 @@
/*
* This is working, but unfinished!
* - Event handling not finished.
- * - Some configure checking magic missing for the special header files
+ * - Some configure checking magic missing for the special header files
* and functions.
* - Not everything implementation correctly cross checked.
* - Coolpix P3 does not give transfer status (image 000x/000y), and reports an
@@ -439,7 +439,7 @@ ptp_ptpip_init_command_request (PTPParams* params)
unsigned int i;
int len, ret;
unsigned char guid[16];
-
+
ptp_nikon_getptpipguid(guid);
#if !defined (WIN32)
if (gethostname (hostname, sizeof(hostname)))
@@ -650,7 +650,7 @@ ptp_ptpip_event_wait (PTPParams* params, PTPContainer* event) {
*
* This command gets the GUID of this machine. If it does not exists, it creates
* one.
- *
+ *
* params: PTPParams*
*
* Return values: Some PTP_RC_* code.
@@ -664,9 +664,9 @@ ptp_nikon_getptpipguid (unsigned char* guid) {
int valid;
char* endptr;
char* pos;
-
+
gp_setting_get("ptp2_ip","guid",buffer);
-
+
if (strlen(buffer) == 47) { /* 47 = 16*2 (numbers) + 15 (semi-colons) */
pos = buffer;
valid = 1;
@@ -687,9 +687,9 @@ ptp_nikon_getptpipguid (unsigned char* guid) {
if (valid)
return;
}
-
+
/*fprintf(stderr, "Invalid GUID\n");*/
-
+
/* Generate an ID */
srand(time(NULL));
buffer[0] = 0;
@@ -699,9 +699,9 @@ ptp_nikon_getptpipguid (unsigned char* guid) {
pos += sprintf(pos, "%02x:", guid[i]);
}
buffer[47] = 0;
-
+
/*printf("New GUID: %s\n", buffer);*/
-
+
gp_setting_set("ptp2_ip","guid",buffer);
}
diff --git a/camlibs/ricoh/crctab.h b/camlibs/ricoh/crctab.h
index 4b6f58284..dfb08d08c 100644
--- a/camlibs/ricoh/crctab.h
+++ b/camlibs/ricoh/crctab.h
@@ -39,14 +39,14 @@ static unsigned short crctab[256] = {
};
/*
- * updcrc macro derived from article Copyright 1986 Stephen Satchell.
+ * updcrc macro derived from article Copyright 1986 Stephen Satchell.
* NOTE: First srgument must be in range 0 to 255.
* Second argument is referenced twice.
- *
- * Programmers may incorporate any or all code into their programs,
- * giving proper credit within the source. Publication of the
- * source routines is permitted so long as proper credit is given
- * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
+ *
+ * Programmers may incorporate any or all code into their programs,
+ * giving proper credit within the source. Publication of the
+ * source routines is permitted so long as proper credit is given
+ * to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
* Omen Technology.
*/
diff --git a/camlibs/ricoh/g3.c b/camlibs/ricoh/g3.c
index 9c1a74074..2570df5c4 100644
--- a/camlibs/ricoh/g3.c
+++ b/camlibs/ricoh/g3.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -42,11 +42,11 @@
# define N_(String) (String)
#endif
-/* channel header:
+/* channel header:
*
* channel host/client length data checksum padding
* 01 01 00 00 07 00 00 00 <7 byte> <1 byte> <fill to next 4>
- *
+ *
*/
static int
@@ -57,7 +57,7 @@ g3_channel_read(GPPort *port, int *channel, char **buffer, unsigned int *len)
int ret;
ret = gp_port_read(port, (char *)xbuf, 0x800);
- if (ret < GP_OK) {
+ if (ret < GP_OK) {
gp_log(GP_LOG_ERROR, "g3", "read error in g3_channel_read\n");
return ret;
}
@@ -70,7 +70,7 @@ g3_channel_read(GPPort *port, int *channel, char **buffer, unsigned int *len)
*channel = xbuf[1];
*len = xbuf[4] + (xbuf[5]<<8) + (xbuf[6]<<16) + (xbuf[7]<<24);
if (*len >= 0xffffffff-0x800-1) return GP_ERROR_CORRUPTED_DATA;
- /* Safety buffer of 0x800 ... we can only read in 0x800 chunks,
+ /* Safety buffer of 0x800 ... we can only read in 0x800 chunks,
* otherwise the communication gets hickups. However *len might be
* less.
*/
@@ -171,7 +171,7 @@ g3_channel_write(GPPort *port, int channel, char *buffer, int len)
while (len > 0) {
int sendlen = len;
-
+
if (sendlen>65536) sendlen = 65536;
nlen = (4 + 4 + sendlen + 1 + 3) & ~3;
xbuf = calloc(nlen,1);
@@ -223,14 +223,14 @@ g3_ftp_command_and_reply(GPPort *port, char *cmd, char **reply) {
}
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "ricoh_g3");
return (GP_OK);
}
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -744,7 +744,7 @@ folder_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
if (!strcmp("/EXT0",buf))
gp_list_append (list, "EXT0", NULL);
-
+
/* always add internal memory */
gp_list_append (list, "IROM", NULL);
return GP_OK;
@@ -777,7 +777,7 @@ folder_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
} else {
if (buf[0] == '4')
ret = GP_OK;
- else
+ else
ret = GP_ERROR_IO;
}
out:
@@ -870,13 +870,13 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
3653);
ret = gp_filesystem_set_info_noop(fs, folder, xfn, info, context);
-
+
}
}
} else {
if (buf[0] == '4') /* 450 Open Error ... like dir not there */
ret = GP_OK;
- else
+ else
ret = GP_ERROR_IO;
}
out:
@@ -896,7 +896,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
/*char *buf;*/
GPPortSettings settings;
@@ -918,13 +918,13 @@ camera_init (Camera *camera, GPContext *context)
* already open). You just have to use functions like
* gp_port_timeout_set, gp_port_settings_get, gp_port_settings_set.
*/
-
+
/*
- * Once you have configured the port, you should check if a
+ * Once you have configured the port, you should check if a
* connection to the camera can be established.
*/
- /* testing code ...
+ /* testing code ...
buf = NULL;
g3_ftp_command_and_reply(camera->port, "-PWOF STDBY", &buf);
*/
diff --git a/camlibs/ricoh/library.c b/camlibs/ricoh/library.c
index ccf1cacf4..7ee831c60 100644
--- a/camlibs/ricoh/library.c
+++ b/camlibs/ricoh/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -41,7 +41,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -143,23 +143,23 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
CR (n = gp_filesystem_number (fs, folder, filename, context));
n++;
-
+
info->audio.fields = GP_FILE_INFO_NONE; /* no info anbout audio files */
-
+
info->preview.width = 80;
info->preview.height = 60;
- info->preview.fields = GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT;
-
+ info->preview.fields = GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT;
+
CR (ricoh_get_pic_name (camera, context, n, &name));
CR (ricoh_get_pic_date (camera, context, n, &info->file.mtime));
CR (ricoh_get_pic_size (camera, context, n, &info->file.size));
strcpy (info->file.type, GP_MIME_EXIF);
info->file.fields = GP_FILE_INFO_SIZE | GP_FILE_INFO_MTIME
| GP_FILE_INFO_TYPE;
-
+
return (GP_OK);
}
-
+
static int
get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *user_data,
@@ -183,7 +183,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CR (ricoh_get_pic (camera, context, n,
RICOH_FILE_TYPE_PREVIEW, &data, &size));
gp_file_set_mime_type (file, GP_MIME_TIFF);
- break;
+ break;
default:
return (GP_ERROR_NOT_SUPPORTED);
}
@@ -547,11 +547,11 @@ camera_init (Camera *camera, GPContext *context)
CR (gp_port_set_settings (camera->port, settings));
/*
- * Note that ricoh_connect can only be called to
+ * Note that ricoh_connect can only be called to
* initialize the connection at 2400 bps. At other
* speeds, a different function needs to be used.
*/
- result = (speeds[i].rspeed == RICOH_SPEED_2400) ?
+ result = (speeds[i].rspeed == RICOH_SPEED_2400) ?
ricoh_connect (camera, NULL, &model) :
ricoh_get_mode (camera, NULL, NULL);
if (result == GP_OK)
@@ -591,7 +591,7 @@ camera_init (Camera *camera, GPContext *context)
camera->functions->set_config = camera_set_config;
CR (gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera));
/*
- * Remember the model. It could be that there hasn't been the
+ * Remember the model. It could be that there hasn't been the
* need to call ricoh_connect. Then we don't have a model. Should
* we disconnect and reconnect in this case?
*/
diff --git a/camlibs/ricoh/ricoh.c b/camlibs/ricoh/ricoh.c
index df5624997..31fe3f8b8 100644
--- a/camlibs/ricoh/ricoh.c
+++ b/camlibs/ricoh/ricoh.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -45,7 +45,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -287,7 +287,7 @@ ricoh_transmit (Camera *camera, GPContext *context, unsigned char cmd,
unsigned char ret_cmd;
unsigned int r = 0;
int result;
-
+
while (1) {
CR (ricoh_send (camera, context, cmd, 0, data, len));
result = ricoh_recv (camera, context, &ret_cmd, NULL,
@@ -417,7 +417,7 @@ ricoh_get_pic_date (Camera *camera, GPContext *context, unsigned int n,
if (date) {
time.tm_year = B2H (buf[1]);
/* correct for Y2K in case older images are read */
- if (time.tm_year < 90) time.tm_year += 100;
+ if (time.tm_year < 90) time.tm_year += 100;
time.tm_mon = B2H (buf[2]) - 1;
time.tm_mday = B2H (buf[3]);
time.tm_hour = B2H (buf[4]);
@@ -588,9 +588,9 @@ ricoh_get_pic (Camera *camera, GPContext *context, unsigned int n,
unsigned int r, header_len;
RicohMode mode;
- GP_DEBUG ("Getting image %i as %s...", n,
+ GP_DEBUG ("Getting image %i as %s...", n,
(type==RICOH_FILE_TYPE_PREVIEW ? "thumbnail":"image"));
-
+
/* Put camera into play mode, if not already */
CR (ricoh_get_mode (camera, context, &mode));
if (mode != RICOH_MODE_PLAY)
@@ -675,9 +675,9 @@ ricoh_set_date (Camera *camera, GPContext *context, time_t time)
t = localtime (&time);
#ifdef HAVE_TM_GMTOFF
time += t->tm_gmtoff;
-#else
+#else
time += timezone;
-#endif
+#endif
t = localtime (&time);
GP_DEBUG ("ricoh_set_date: converted time to localtime %s "
"(timezone is %ld)", asctime (t), timezone);
@@ -845,7 +845,7 @@ ricoh_put_file (Camera *camera, GPContext *context, const char *name,
C_LEN (context, len, 2);
/*
- * We just received the picture number of the new file. We don't
+ * We just received the picture number of the new file. We don't
* need it.
*/
@@ -854,7 +854,7 @@ ricoh_put_file (Camera *camera, GPContext *context, const char *name,
for (i = 0; i < size; i += 128) {
memset (block, 0, sizeof (buf));
memcpy (block, data + i, MIN (128, size - i));
- CR (ricoh_transmit (camera, context, 0xa2, block, 128,
+ CR (ricoh_transmit (camera, context, 0xa2, block, 128,
buf, &len));
C_LEN (context, len, 0);
if (gp_context_cancel (context) == GP_CONTEXT_FEEDBACK_CANCEL)
diff --git a/camlibs/ricoh/ricoh.h b/camlibs/ricoh/ricoh.h
index 426f14e2a..531e36064 100644
--- a/camlibs/ricoh/ricoh.h
+++ b/camlibs/ricoh/ricoh.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/samsung/samsung.c b/camlibs/samsung/samsung.c
index 9d7429a4e..8031b83fc 100644
--- a/camlibs/samsung/samsung.c
+++ b/camlibs/samsung/samsung.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -107,7 +107,7 @@ static int
is_null (unsigned char *buf)
{
int n = 128;
-
+
while (n--)
if (*(buf++))
return (0);
@@ -129,7 +129,7 @@ SDSC_initialize (GPPort *port)
}
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy (id->text, "samsung");
@@ -147,7 +147,7 @@ static const struct {
};
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
int i;
CameraAbilities a;
@@ -235,7 +235,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
static int
-camera_about (Camera *camera, CameraText *about, GPContext *context)
+camera_about (Camera *camera, CameraText *about, GPContext *context)
{
/* Translators: please write 'M"uller' and 'Mei"sner' (that
is, with u-umlaut and eszett resp.) if your charset
@@ -259,7 +259,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
Camera *camera = data;
/* Rewind */
- CHECK_RESULT (SDSC_initialize (camera->port));
+ CHECK_RESULT (SDSC_initialize (camera->port));
/* Count the pictures */
while (1) {
@@ -284,7 +284,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
info->file.fields = GP_FILE_INFO_NONE;
/* Don't rewind, just go forward until we find it.
- * Works way better for linear queries.
+ * Works way better for linear queries.
*/
while (1) {
CHECK_RESULT (SDSC_send (camera->port, SDSC_NEXT));
@@ -318,7 +318,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
GPPortSettings settings;
diff --git a/camlibs/sierra/epson-desc.c b/camlibs/sierra/epson-desc.c
index 7f72a4941..f8cb8180b 100644
--- a/camlibs/sierra/epson-desc.c
+++ b/camlibs/sierra/epson-desc.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -36,13 +36,13 @@
*/
/*
- * Notes:
+ * Notes:
*
* The variable "value" in a ValueNameType is the first element of
* the name/value union, and so it is the default value initialized.
*
* To init to a range, use:
- * { .range = { 100.1, 2000.0, 10 } }, NULL
+ * { .range = { 100.1, 2000.0, 10 } }, NULL
*
* Casts are used to avoid warnings about using a const.
*
@@ -79,9 +79,9 @@ static const ValueNameType ep3000z_reg_01_val_names[] = {
{ { 0x03 }, "SuperFine 2048x1536" },
{ { 0x04 }, "HyPict 2544x1904" },
};
-static const RegisterDescriptorType ep3000z_reg_01[] = {
+static const RegisterDescriptorType ep3000z_reg_01[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"resolution", N_("Resolution plus Size"),
VAL_NAME_INIT (ep3000z_reg_01_val_names)
}
@@ -91,15 +91,15 @@ static const RegisterDescriptorType ep3000z_reg_01[] = {
* Register 2: Date and time.
*/
static const ValueNameType ep3000z_reg_02_val_names[] = {
- /*
+ /*
* Dummy value, since we need at least one of these to
* display anything.
*/
{ { 0x00 }, "Dummy" },
};
-static const RegisterDescriptorType ep3000z_reg_02[] = {
+static const RegisterDescriptorType ep3000z_reg_02[] = {
{
- GP_WIDGET_DATE, GP_REG_NO_MASK,
+ GP_WIDGET_DATE, GP_REG_NO_MASK,
"date-time", N_("Date and time (GMT)"),
VAL_NAME_INIT (ep3000z_reg_02_val_names)
}
@@ -110,7 +110,7 @@ static const RegisterDescriptorType ep3000z_reg_02[] = {
*/
/*
- * Register 5: aperture settings.
+ * Register 5: aperture settings.
*/
static const ValueNameType ep3000z_reg_05_val_names[] = {
{ { 6 }, N_("auto") },
@@ -121,9 +121,9 @@ static const ValueNameType ep3000z_reg_05_val_names[] = {
{ { 4 }, "F5.6" },
{ { 5 }, "F8.0" },
};
-static const RegisterDescriptorType ep3000z_reg_05[] = {
+static const RegisterDescriptorType ep3000z_reg_05[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"aperture", N_("Aperture Settings"),
VAL_NAME_INIT (ep3000z_reg_05_val_names)
}
@@ -136,9 +136,9 @@ static const ValueNameType ep3000z_reg_06_val_names[] = {
{ { 1 }, N_("Color") },
{ { 2 }, N_("Black & White") },
};
-static const RegisterDescriptorType ep3000z_reg_06[] = {
+static const RegisterDescriptorType ep3000z_reg_06[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"color", N_("Color Mode"),
VAL_NAME_INIT (ep3000z_reg_06_val_names)
}
@@ -154,10 +154,10 @@ static const ValueNameType ep3000z_reg_07_val_names[] = {
{ { 3 }, N_("Red-eye Reduction") },
{ { 4 }, N_("Slow Sync") },
};
-static const RegisterDescriptorType ep3000z_reg_07[] = {
+static const RegisterDescriptorType ep3000z_reg_07[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "flash", N_("Flash Settings"),
+ "flash", N_("Flash Settings"),
VAL_NAME_INIT (ep3000z_reg_07_val_names)
}
};
@@ -170,7 +170,7 @@ static const ValueNameType ep3000z_reg_20_val_names[] = {
{ { 0x01 }, N_("Fixed") },
{ { 0xFF }, N_("Custom") },
};
-static const RegisterDescriptorType ep3000z_reg_20[] = {
+static const RegisterDescriptorType ep3000z_reg_20[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"whitebalance", N_("White Balance"),
@@ -187,7 +187,7 @@ static const RegisterDescriptorType ep3000z_reg_20[] = {
static const ValueNameType ep3000z_reg_23_val_names[] = {
{ { .range = { 30, 600, 30 } }, NULL },
};
-static const RegisterDescriptorType ep3000z_reg_23[] = {
+static const RegisterDescriptorType ep3000z_reg_23[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"host-power-save", N_("Host power save (seconds)"),
@@ -203,7 +203,7 @@ static const RegisterDescriptorType ep3000z_reg_23[] = {
static const ValueNameType ep3000z_reg_24_val_names[] = {
{ { .range = { 30, 600, 30 } }, NULL },
};
-static const RegisterDescriptorType ep3000z_reg_24[] = {
+static const RegisterDescriptorType ep3000z_reg_24[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"camera-power-save", N_("Camera power save (seconds)"),
@@ -218,7 +218,7 @@ static const ValueNameType ep3000z_reg_33_val_names[] = {
{ { 0x01 }, N_("Macro") },
{ { 0x02 }, N_("Normal") },
};
-static const RegisterDescriptorType ep3000z_reg_33[] = {
+static const RegisterDescriptorType ep3000z_reg_33[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"lens-mode", N_("Lens Mode"),
@@ -274,12 +274,12 @@ static CameraRegisterType ep3000z_cam_regs[] = {
};
static const CameraRegisterSetType ep3000z_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, ep3000z_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, ep3000z_cam_regs)
},
};
diff --git a/camlibs/sierra/library.c b/camlibs/sierra/library.c
index e6f0aec22..21f790266 100644
--- a/camlibs/sierra/library.c
+++ b/camlibs/sierra/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -82,7 +82,7 @@ typedef enum _SierraPacket SierraPacket;
#define QUICKSLEEP 5
int sierra_change_folder (Camera *camera, const char *folder, GPContext *context)
-{
+{
int st = 0, i;
char target[128];
@@ -90,7 +90,7 @@ int sierra_change_folder (Camera *camera, const char *folder, GPContext *context
GP_DEBUG ("*** folder: %s", folder);
/*
- * Do not issue the command if the camera doesn't support folders
+ * Do not issue the command if the camera doesn't support folders
* or if the folder is the current working folder
*/
if (!camera->pl->folders || !strcmp (camera->pl->folder, folder))
@@ -117,7 +117,7 @@ int sierra_change_folder (Camera *camera, const char *folder, GPContext *context
target[i] = '\0';
if (st == i - 1)
break;
- CHECK (sierra_set_string_register (camera, 84,
+ CHECK (sierra_set_string_register (camera, 84,
target + st, strlen (target + st), context));
st = i + 1;
@@ -164,7 +164,7 @@ int sierra_list_files (Camera *camera, const char *folder, CameraList *list, GPC
/*
* Get the filename of the first picture. Note that some cameras
- * that don't support filenames return 8 blanks instead of
+ * that don't support filenames return 8 blanks instead of
* reporting an error. If this is indeed the case, just fill
* the list with dummy entries and return.
*/
@@ -217,7 +217,7 @@ int sierra_list_folders (Camera *camera, const char *folder, CameraList *list,
CHECK (sierra_set_int_register (camera, 83, i + 1, context));
bsize = 1024;
GP_DEBUG ("*** getting name of folder %i", i + 1);
- CHECK (sierra_get_string_register (camera, 84, 0,
+ CHECK (sierra_get_string_register (camera, 84, 0,
NULL, (unsigned char *)buf,
&bsize, context));
@@ -234,7 +234,7 @@ int sierra_list_folders (Camera *camera, const char *folder, CameraList *list,
* sierra_get_picture_folder:
* @camera : camera data structure
* @folder : folder name (to be freed by the caller)
- *
+ *
* Return the name of the folder that stores pictures. It is assumed that
* the camera conforms with the JEIDA standard. Thus, look for the picture
* folder into the /DCIM directory.
@@ -287,7 +287,7 @@ int sierra_get_picture_folder (Camera *camera, char **folder)
/**
* sierra_check_battery_capacity:
* @camera : camera data structure
- *
+ *
* Check if the battery capacity is high enough.
*
* Returns: a gphoto2 error code
@@ -320,8 +320,8 @@ int sierra_check_battery_capacity (Camera *camera, GPContext *context)
* sierra_get_memory_left:
* @camera : camera data structure
* @memory : memory left
- *
- * Provide the available memory left
+ *
+ * Provide the available memory left
*
* Returns: a gphoto2 error code
*/
@@ -374,7 +374,7 @@ sierra_check_connection (Camera *camera, GPContext *context)
default:
/*
- * If any error (except timeout) has occurred,
+ * If any error (except timeout) has occurred,
* report it.
*/
CHECK (ret);
@@ -421,7 +421,7 @@ sierra_write_packet (Camera *camera, char *packet, GPContext *context)
case SIERRA_PACKET_COMMAND:
switch (camera->port->type) {
case GP_PORT_SERIAL:
- packet[1] = (camera->pl->first_packet ?
+ packet[1] = (camera->pl->first_packet ?
SUBSIERRA_PACKET_COMMAND_FIRST :
SUBSIERRA_PACKET_COMMAND);
camera->pl->first_packet = 0;
@@ -451,7 +451,7 @@ sierra_write_packet (Camera *camera, char *packet, GPContext *context)
for (x = 4; x < length - 2; x++)
checksum += (unsigned char)packet[x];
packet[length-2] = checksum & 0xff;
- packet[length-1] = (checksum >> 8) & 0xff;
+ packet[length-1] = (checksum >> 8) & 0xff;
}
if (camera->pl->flags & SIERRA_WRAP_USB_MASK) {
@@ -468,7 +468,7 @@ sierra_write_packet (Camera *camera, char *packet, GPContext *context)
static int
sierra_clear_usb_halt(Camera *camera)
{
-
+
if ( (camera->port->type == GP_PORT_USB) &&
!(camera->pl->flags & SIERRA_WRAP_USB_MASK) &&
!(camera->pl->flags & SIERRA_NO_USB_CLEAR) )
@@ -494,7 +494,7 @@ sierra_write_nak (Camera *camera, GPContext *context)
* sierra_read_packet:
* @camera : camera data structure
* @packet : to return the read packet
- *
+ *
* Read a data packet from the camera.
*
* Method:
@@ -569,7 +569,7 @@ sierra_read_packet (Camera *camera, unsigned char *packet, GPContext *context)
continue;
}
if (result == 0) {
- GP_DEBUG ("Read got 0 bytes..");
+ GP_DEBUG ("Read got 0 bytes..");
if (++r > 2) {
sierra_clear_usb_halt(camera);
GP_DEBUG ("Giving up...");
@@ -581,7 +581,7 @@ sierra_read_packet (Camera *camera, unsigned char *packet, GPContext *context)
br = result;
/*
- * If the first read byte is not known,
+ * If the first read byte is not known,
* report an error and exit the processing.
*/
switch (packet[0]) {
@@ -649,7 +649,7 @@ sierra_read_packet (Camera *camera, unsigned char *packet, GPContext *context)
return GP_ERROR_IO;
}
- /*
+ /*
* Read until the end of the packet is reached
* or an error occurred.
*/
@@ -698,8 +698,8 @@ sierra_read_packet (Camera *camera, unsigned char *packet, GPContext *context)
if ((packet[br - 2] == 0x00) &&
(packet[br - 1] == 0x00))
break;
-
-
+
+
GP_DEBUG ("Checksum wrong (calculated 0x%x, "
"found 0x%x)!", c,
packet[br - 2] + (packet[br - 1] * 256));
@@ -803,7 +803,7 @@ sierra_transmit_ack (Camera *camera, char *packet, GPContext *context)
"retries."));
return GP_ERROR;
}
-
+
/*
* The camera has ended this session and
* reverted the speed back to 19200. Reinitialize
@@ -830,7 +830,7 @@ sierra_transmit_ack (Camera *camera, char *packet, GPContext *context)
static int
sierra_build_packet (Camera *camera, char type, char subtype,
- int data_length, char *packet)
+ int data_length, char *packet)
{
packet[0] = type;
switch (type) {
@@ -855,13 +855,13 @@ sierra_build_packet (Camera *camera, char type, char subtype,
}
static int
-sierra_write_ack (Camera *camera, GPContext *context)
+sierra_write_ack (Camera *camera, GPContext *context)
{
char buf[4096];
int ret;
GP_DEBUG ("Writing acknowledgement...");
-
+
buf[0] = ACK;
ret = sierra_write_packet (camera, buf, context);
sierra_clear_usb_halt(camera);
@@ -872,7 +872,7 @@ sierra_write_ack (Camera *camera, GPContext *context)
}
int
-sierra_init (Camera *camera, GPContext *context)
+sierra_init (Camera *camera, GPContext *context)
{
unsigned char buf[SIERRA_PACKET_SIZE], packet[4096];
int ret, r = 0;
@@ -917,7 +917,7 @@ sierra_init (Camera *camera, GPContext *context)
CHECK (ret);
switch (buf[0]) {
- case SIERRA_PACKET_NAK:
+ case SIERRA_PACKET_NAK:
/* Everything is fine. */
return GP_OK;
@@ -950,7 +950,7 @@ static struct {
};
int
-sierra_set_speed (Camera *camera, SierraSpeed speed, GPContext *context)
+sierra_set_speed (Camera *camera, SierraSpeed speed, GPContext *context)
{
GPPortSettings settings;
unsigned int i, bit_rate;
@@ -961,7 +961,7 @@ sierra_set_speed (Camera *camera, SierraSpeed speed, GPContext *context)
/*
* Check that the requested speed is valid. We don't want to bug
- * the user with our coding errors, therefore if the requested
+ * the user with our coding errors, therefore if the requested
* speed is invalid, we use 19200.
*/
for (i = 0; SierraSpeeds[i].bit_rate; i++)
@@ -1041,7 +1041,7 @@ sierra_action (Camera *camera, SierraAction action, GPContext *context)
int
sierra_set_int_register (Camera *camera, int reg, int value,
- GPContext *context)
+ GPContext *context)
{
char p[4096];
@@ -1066,7 +1066,7 @@ sierra_set_int_register (Camera *camera, int reg, int value,
return GP_OK;
}
-int sierra_get_int_register (Camera *camera, int reg, int *value, GPContext *context)
+int sierra_get_int_register (Camera *camera, int reg, int *value, GPContext *context)
{
int r = 0;
unsigned char p[4096], buf[SIERRA_PACKET_SIZE];
@@ -1076,7 +1076,7 @@ int sierra_get_int_register (Camera *camera, int reg, int *value, GPContext *con
/* Build and send the packet. */
CHECK (sierra_build_packet (camera, SIERRA_PACKET_COMMAND, 0, 2, (char *)p));
p[4] = 0x01;
- p[5] = reg;
+ p[5] = reg;
CHECK (sierra_write_packet (camera, (char *)p, context));
while (1) {
@@ -1144,13 +1144,13 @@ int sierra_get_int_register (Camera *camera, int reg, int *value, GPContext *con
int
sierra_set_string_register (Camera *camera, int reg, const char *s,
- long int length, GPContext *context)
+ long int length, GPContext *context)
{
char packet[4096];
char type;
long int x=0;
- int seq=0, size=0;
+ int seq=0, size=0;
int do_percent;
unsigned int id = 0;
@@ -1210,7 +1210,7 @@ sierra_set_string_register (Camera *camera, int reg, const char *s,
return GP_OK;
}
-int sierra_get_string_register (Camera *camera, int reg, int fnumber,
+int sierra_get_string_register (Camera *camera, int reg, int fnumber,
CameraFile *file, unsigned char *b,
unsigned int *b_len, GPContext *context)
{
@@ -1239,7 +1239,7 @@ int sierra_get_string_register (Camera *camera, int reg, int fnumber,
/* Build and send the request */
CHECK (sierra_build_packet (camera, SIERRA_PACKET_COMMAND, 0, 2, (char *)p));
- /*
+ /*
* If the extended protocol is enabled, use code 0x06 so we can send
* and receive 32k size packages, otherwise code 0x04 is used and
* we have 2k size packages.
@@ -1264,7 +1264,7 @@ int sierra_get_string_register (Camera *camera, int reg, int fnumber,
do {
/* Read one packet and retry on timeout. */
- r = sierra_read_packet (camera, p, context);
+ r = sierra_read_packet (camera, p, context);
if (r == GP_ERROR_TIMEOUT) {
if (++retries > RETRIES) {
in_function = 0;
@@ -1322,7 +1322,7 @@ sierra_delete_all (Camera *camera, GPContext *context)
}
int
-sierra_delete (Camera *camera, int picture_number, GPContext *context)
+sierra_delete (Camera *camera, int picture_number, GPContext *context)
{
/* Tell the camera which picture to delete and execute command. */
CHECK (sierra_set_int_register (camera, 4, picture_number, context));
@@ -1332,7 +1332,7 @@ sierra_delete (Camera *camera, int picture_number, GPContext *context)
}
int
-sierra_end_session (Camera *camera, GPContext *context)
+sierra_end_session (Camera *camera, GPContext *context)
{
CHECK (sierra_action (camera, SIERRA_ACTION_END, context));
@@ -1398,10 +1398,10 @@ sierra_capture (Camera *camera, CameraCaptureType type,
CHECK (gp_port_set_timeout (camera->port, timeout));
if (filepath != NULL) {
- /*
+ /*
* After the picture is taken, register 4 is set to the
* current picture.
- */
+ */
GP_DEBUG ("Getting picture number.");
r = sierra_get_int_register (camera, 4, &n, context);
if (r == GP_OK) {
@@ -1418,7 +1418,7 @@ sierra_capture (Camera *camera, CameraCaptureType type,
*
* Not that some cameras that don't support filenames will
* return 8 blanks instead of reporting an error.
- *
+ *
* Some newer cameras (Nikon*) do not return register 4, so
* ignore errors from that.
*/
diff --git a/camlibs/sierra/library.h b/camlibs/sierra/library.h
index bd87bb483..4ca1eb672 100644
--- a/camlibs/sierra/library.h
+++ b/camlibs/sierra/library.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -127,7 +127,7 @@ int sierra_get_string_register (Camera *camera, int reg, int file_number,
int sierra_delete (Camera *camera, int picture_number,
GPContext *context);
int sierra_delete_all (Camera *camera, GPContext *context);
-int sierra_capture (Camera *camera, CameraCaptureType type,
+int sierra_capture (Camera *camera, CameraCaptureType type,
CameraFilePath *filepath,
GPContext *context);
int sierra_capture_preview (Camera *camera, CameraFile *file,
@@ -147,8 +147,8 @@ int sierra_upload_file (Camera *camera, CameraFile *file,
GPContext *context);
/* Camera desc functions in sierra-desc.c */
-int camera_set_config_cam_desc (Camera *camera, CameraWidget *window,
+int camera_set_config_cam_desc (Camera *camera, CameraWidget *window,
GPContext *context);
-int camera_get_config_cam_desc (Camera *camera, CameraWidget **window,
+int camera_get_config_cam_desc (Camera *camera, CameraWidget **window,
GPContext *context);
#endif /* __LIBRARY_H__ */
diff --git a/camlibs/sierra/nikon-desc.c b/camlibs/sierra/nikon-desc.c
index 41c58673f..9b55d1681 100644
--- a/camlibs/sierra/nikon-desc.c
+++ b/camlibs/sierra/nikon-desc.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -32,13 +32,13 @@
*/
/*
- * Notes:
+ * Notes:
*
* The variable "value" in a ValueNameType is the first element of
* the name/value union, and so it is the default value initialized.
*
* To init to a range, use:
- * { .range = { 100.1, 2000.0, 10 } }, NULL
+ * { .range = { 100.1, 2000.0, 10 } }, NULL
*
* Casts are used to avoid warnings about using a const.
*
@@ -70,7 +70,7 @@
* Register 1: resolution/size.
*/
static const ValueNameType cp880_reg_01_val_names[] = {
- /*
+ /*
* These values suck. why didn't they make these maskable, or use
* a nibble for each part? Just use a the combined resolution + size.
* It would be good to try and break these into two selections.
@@ -86,9 +86,9 @@ static const ValueNameType cp880_reg_01_val_names[] = {
{ { 0x13 }, "Fine-Full" },
{ { 0x23 }, "Hi-Full" },
};
-static const RegisterDescriptorType cp880_reg_01[] = {
+static const RegisterDescriptorType cp880_reg_01[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"resolution", N_("Resolution plus Size"),
VAL_NAME_INIT (cp880_reg_01_val_names)
}
@@ -98,7 +98,7 @@ static const RegisterDescriptorType cp880_reg_01[] = {
* Register 1: resolution/size.
*/
static const ValueNameType cp2500_reg_01_val_names[] = {
- /*
+ /*
* These values suck. why didn't they make these maskable, or use
* a nibble for each part? Just use a the combined resolution + size.
* It would be good to try and break these into two selections.
@@ -120,9 +120,9 @@ static const ValueNameType cp2500_reg_01_val_names[] = {
{ { 0x0c }, "Fine-UXGA" },
};
-static const RegisterDescriptorType cp2500_reg_01[] = {
+static const RegisterDescriptorType cp2500_reg_01[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"resolution", N_("Resolution plus Size"),
VAL_NAME_INIT (cp2500_reg_01_val_names)
}
@@ -132,15 +132,15 @@ static const RegisterDescriptorType cp2500_reg_01[] = {
* Register 2: Date and time.
*/
static const ValueNameType cp880_reg_02_val_names[] = {
- /*
+ /*
* Dummy value, since we need at least one of these to
* display anything.
*/
{ { 0x00 }, "Dummy" },
};
-static const RegisterDescriptorType cp880_reg_02[] = {
+static const RegisterDescriptorType cp880_reg_02[] = {
{
- GP_WIDGET_DATE, GP_REG_NO_MASK,
+ GP_WIDGET_DATE, GP_REG_NO_MASK,
"date-time", N_("Date and time (GMT)"),
VAL_NAME_INIT (cp880_reg_02_val_names)
}
@@ -151,20 +151,20 @@ static const RegisterDescriptorType cp880_reg_02[] = {
* work.
*/
#ifdef RANGE_FOR_SHUTTER
-static const ValueNameType cp880_reg_03_val_names[] = {
+static const ValueNameType cp880_reg_03_val_names[] = {
{
- { .range = { 0, 8000000 } }, NULL
+ { .range = { 0, 8000000 } }, NULL
}
};
-static const RegisterDescriptorType cp880_reg_03[] = {
+static const RegisterDescriptorType cp880_reg_03[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"shutter", N_("Shutter Speed microseconds (0 auto)"),
VAL_NAME_INIT (cp880_reg_03_val_names)
}
};
#endif
-static const ValueNameType cp880_reg_03_val_names[] = {
+static const ValueNameType cp880_reg_03_val_names[] = {
{ { 0 }, N_("Auto") },
{ { 1000 }, "1/1000" },
{ { 2000 }, "1/500" },
@@ -187,9 +187,9 @@ static const ValueNameType cp880_reg_03_val_names[] = {
/* { { -20 }, "bulb?" }, */
};
-static const RegisterDescriptorType cp880_reg_03[] = {
+static const RegisterDescriptorType cp880_reg_03[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"shutter", N_("Shutter Speed (in seconds)"),
VAL_NAME_INIT (cp880_reg_03_val_names)
}
@@ -204,9 +204,9 @@ static const ValueNameType cp880_reg_05_val_names[] = {
{ { 2 }, N_("Medium") },
/* { { 4 }, N_("High") }, not on a cp880 */
};
-static const RegisterDescriptorType cp880_reg_05[] = {
+static const RegisterDescriptorType cp880_reg_05[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"aperture", N_("Aperture Settings"),
VAL_NAME_INIT (cp880_reg_05_val_names)
}
@@ -219,9 +219,9 @@ static const ValueNameType cp880_reg_06_val_names[] = {
{ { 1 }, N_("Color") },
{ { 2 }, N_("B/W") },
};
-static const RegisterDescriptorType cp880_reg_06[] = {
+static const RegisterDescriptorType cp880_reg_06[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"color", N_("Color Mode"),
VAL_NAME_INIT (cp880_reg_06_val_names)
}
@@ -237,10 +237,10 @@ static const ValueNameType cp880_reg_07_val_names[] = {
{ { 3 }, N_("Anti-redeye") },
{ { 4 }, N_("Slow-sync") },
};
-static const RegisterDescriptorType cp880_reg_07[] = {
+static const RegisterDescriptorType cp880_reg_07[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "flash", N_("Flash Settings"),
+ "flash", N_("Flash Settings"),
VAL_NAME_INIT (cp880_reg_07_val_names)
}
};
@@ -256,7 +256,7 @@ static const ValueNameType cp880_reg_19_val_names[] = {
{ { 3 }, N_("Brightness+") }, /* cp880 lighten image */
{ { 4 }, N_("Brightness-") }, /* cp880 darken image */
};
-static const RegisterDescriptorType cp880_reg_19[] = {
+static const RegisterDescriptorType cp880_reg_19[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"image-adj", N_("Image Adjustment"), /* brightness/contrast */
@@ -269,7 +269,7 @@ static const RegisterDescriptorType cp880_reg_19[] = {
*
* Could not determine how the camera does the gradation in settings -
* such as fine +-1,2,3, and FL1 FL2 FL3. Dumping all registers (1 to 90)
- * shows no changes when going (for example) from fine +3 to -3.
+ * shows no changes when going (for example) from fine +3 to -3.
*
* Setting these via the camera to a +3/2/1 etc, and then changing them
* via gphoto2 to another value changes the "type" but the value +3/2/1 is
@@ -287,7 +287,7 @@ static const ValueNameType cp880_reg_20_val_names[] = {
{ { 0x06 }, N_("Preset") }, /* preset automatically by camera, prob range */
{ { 0xff }, N_("Cloudy") }, /* cloudy +3 ... -3 */
};
-static const RegisterDescriptorType cp880_reg_20[] = {
+static const RegisterDescriptorType cp880_reg_20[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"whitebalance", N_("White Balance"),
@@ -305,7 +305,7 @@ static const ValueNameType cp880_reg_30_val_names[] = {
{ { 0x01 }, N_("On") },
{ { 0x02 }, N_("Blink") },
};
-static const RegisterDescriptorType cp880_reg_30[] = {
+static const RegisterDescriptorType cp880_reg_30[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"led", N_("LED Mode"),
@@ -325,7 +325,7 @@ static const ValueNameType cp880_reg_33_val_names[] = {
{ { 0x02 }, N_("Normal") },
{ { 0x03 }, N_("Infinity") },
};
-static const RegisterDescriptorType cp880_reg_33[] = {
+static const RegisterDescriptorType cp880_reg_33[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"focus-mode", N_("Focus Mode"),
@@ -335,7 +335,7 @@ static const RegisterDescriptorType cp880_reg_33[] = {
/*
* Register 34: operation mode. This is only readable, an action with
- * subaction is required to change the mode.
+ * subaction is required to change the mode.
*
* Note that on a cp880, sometimes the play mode ends up with a messed up
* display or an error message, powering the camera off and on seems to
@@ -352,7 +352,7 @@ static const RegisterDescriptorType cp880_reg_33[] = {
* secondary action for this. The register 34 values match those needed to
* change the mode.
*
- * Using a register get/set method of CAM_DESC_SUBACTION enables the
+ * Using a register get/set method of CAM_DESC_SUBACTION enables the
* above kluge.
*/
static const ValueNameType cp880_reg_34_val_names[] = {
@@ -372,9 +372,9 @@ static const ValueNameType cp880_reg_34_val_names[] = {
{ { 0x0c }, "unknown 0x0c" },
*/
};
-static const RegisterDescriptorType cp880_reg_34[] = {
+static const RegisterDescriptorType cp880_reg_34[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"op-mode", N_("Operation Mode"),
VAL_NAME_INIT (cp880_reg_34_val_names)
}
@@ -386,7 +386,7 @@ static const RegisterDescriptorType cp880_reg_34[] = {
static const ValueNameType cp880_reg_35_val_names[] = {
{ { .range = { 0, 7 } }, NULL },
};
-static const RegisterDescriptorType cp880_reg_35[] = {
+static const RegisterDescriptorType cp880_reg_35[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"lcd-brightness", N_("LCD Brightness"),
@@ -401,7 +401,7 @@ static const RegisterDescriptorType cp880_reg_35[] = {
static const ValueNameType cp880_reg_38_val_names[] = {
{ { .range = { 0, 255 /* XXX? */ } }, NULL },
};
-static const RegisterDescriptorType cp880_reg_38[] = {
+static const RegisterDescriptorType cp880_reg_38[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"lcd-auto-shutoff", N_("LCD Auto Shut Off (seconds)"),
@@ -422,13 +422,13 @@ static const ValueNameType cp880_reg_53_val_names[] = {
/* { { 0x06 }, "Italian" }, not on cp880 */
/* { { 0x08 }, "Spanish" }, not on cp880 */
/* { { 0x0a }, "Dutch" }, not on cp880 */
- /* { { 0xnn }, "Japanese" },
+ /* { { 0xnn }, "Japanese" },
*
* weird, can set to japanese, but can't see any change in any
* registers; reg 53 is 3 wether it is english or japanese.
*/
};
-static const RegisterDescriptorType cp880_reg_53[] = {
+static const RegisterDescriptorType cp880_reg_53[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"language", N_("Language"),
@@ -453,9 +453,9 @@ static const ValueNameType cp880_reg_69_val_names[] = {
{ .range = { -2.0, 2.0, .1 } }, NULL,
}
};
-static const RegisterDescriptorType cp880_reg_69[] = {
+static const RegisterDescriptorType cp880_reg_69[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"exp", N_("Exposure Compensation"),
VAL_NAME_INIT (cp880_reg_69_val_names)
}
@@ -476,9 +476,9 @@ static const ValueNameType cp880_reg_69_val_names[] = {
{ { +17 }, "+1.7" },
{ { +20 }, "+2.0" },
};
-static const RegisterDescriptorType cp880_reg_69[] = {
+static const RegisterDescriptorType cp880_reg_69[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"exp", N_("Exposure Compensation"),
VAL_NAME_INIT (cp880_reg_69_val_names)
}
@@ -493,10 +493,10 @@ static const ValueNameType cp880_reg_70_val_names[] = {
{ { 0x05 }, N_("Matrix") },
{ { 0x06 }, N_("Spot-AF") },
};
-static const RegisterDescriptorType cp880_reg_70[] = {
+static const RegisterDescriptorType cp880_reg_70[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "exp-meter", N_("Exposure Metering"),
+ "exp-meter", N_("Exposure Metering"),
VAL_NAME_INIT (cp880_reg_70_val_names)
}
};
@@ -511,9 +511,9 @@ static const ValueNameType cp880_reg_71_val_names[] = {
{ .range = { 8.0, 20.0, .1 } }, NULL
}
};
-static const RegisterDescriptorType cp880_reg_71[] = {
+static const RegisterDescriptorType cp880_reg_71[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"zoom", N_("Zoom (in millimeters)"),
VAL_NAME_INIT (cp880_reg_71_val_names)
}
@@ -547,15 +547,15 @@ static const ValueNameType cp880_reg_72_mask_lo_val_names[] = {
{ { 0x0002 }, N_("Fisheye") },
{ { 0x0004 }, N_("Wide") },
};
-static const RegisterDescriptorType cp880_reg_72[] = {
- {
- GP_WIDGET_RADIO, 0xff00,
+static const RegisterDescriptorType cp880_reg_72[] = {
+ {
+ GP_WIDGET_RADIO, 0xff00,
"dzoom", N_("Digital Zoom"),
VAL_NAME_INIT (cp880_reg_72_mask_hi_val_names)
},
- {
- GP_WIDGET_RADIO, 0x00ff,
- "misc-exp-lenses", N_("Misc exposure/lens settings"),
+ {
+ GP_WIDGET_RADIO, 0x00ff,
+ "misc-exp-lenses", N_("Misc exposure/lens settings"),
VAL_NAME_INIT (cp880_reg_72_mask_lo_val_names)
},
};
@@ -570,14 +570,14 @@ static const ValueNameType cp880_reg_72_mask_lo_val_names[] = {
{ { 0x01 }, N_("on") },
};
-static const RegisterDescriptorType cp880_reg_72[] = {
- {
- GP_WIDGET_RADIO, 0x08,
+static const RegisterDescriptorType cp880_reg_72[] = {
+ {
+ GP_WIDGET_RADIO, 0x08,
"dzoom", N_("Digital Zoom"),
VAL_NAME_INIT (cp880_reg_72_mask_hi_val_names)
},
- {
- GP_WIDGET_RADIO, 0x01,
+ {
+ GP_WIDGET_RADIO, 0x01,
"ael", N_("Auto exposure lock"),
VAL_NAME_INIT (cp880_reg_72_mask_lo_val_names)
},
@@ -612,7 +612,7 @@ static CameraRegisterType cp880_pic_regs[] = {
*/
static CameraRegisterType cp880_cam_regs[] = {
CAM_REG_TYPE_INIT (cp880, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
- CAM_REG_TYPE_INIT (cp880, 34, 4, CAM_DESC_SUBACTION,
+ CAM_REG_TYPE_INIT (cp880, 34, 4, CAM_DESC_SUBACTION,
SIERRA_ACTION_LCD_MODE), /* lcd mode */
CAM_REG_TYPE_INIT (cp880, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
CAM_REG_TYPE_INIT (cp880, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
@@ -646,7 +646,7 @@ static CameraRegisterType cp2500_pic_regs[] = {
*/
static CameraRegisterType cp2500_cam_regs[] = {
CAM_REG_TYPE_INIT (cp880, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
- CAM_REG_TYPE_INIT (cp880, 34, 4, CAM_DESC_SUBACTION,
+ CAM_REG_TYPE_INIT (cp880, 34, 4, CAM_DESC_SUBACTION,
SIERRA_ACTION_LCD_MODE), /* lcd mode */
CAM_REG_TYPE_INIT (cp880, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
CAM_REG_TYPE_INIT (cp880, 53, 4, CAM_DESC_DEFAULT, 0), /* language */
@@ -679,7 +679,7 @@ static CameraRegisterType cp4300_pic_regs[] = {
*/
static CameraRegisterType cp4300_cam_regs[] = {
CAM_REG_TYPE_INIT (cp880, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
- CAM_REG_TYPE_INIT (cp880, 34, 4, CAM_DESC_SUBACTION,
+ CAM_REG_TYPE_INIT (cp880, 34, 4, CAM_DESC_SUBACTION,
SIERRA_ACTION_LCD_MODE), /* lcd mode */
CAM_REG_TYPE_INIT (cp880, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
CAM_REG_TYPE_INIT (cp880, 53, 4, CAM_DESC_DEFAULT, 0), /* language */
@@ -687,39 +687,39 @@ static CameraRegisterType cp4300_cam_regs[] = {
static const CameraRegisterSetType cp880_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, cp880_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, cp880_cam_regs)
},
};
static const CameraRegisterSetType cp2500_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, cp2500_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, cp2500_cam_regs)
},
};
static const CameraRegisterSetType cp4300_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, cp4300_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, cp4300_cam_regs)
},
};
-static const char cp880_manual[] =
+static const char cp880_manual[] =
N_(
"Nikon Coolpix 880:\n"
" Camera configuration (or preferences):\n\n"
@@ -738,7 +738,7 @@ N_(
* possible to control the camera via the USB port since it reportedly
* appears as a USB mass storage device.
*/
-static const char cp995_manual[] =
+static const char cp995_manual[] =
N_(
"Nikon Coolpix 995:\n"
" Camera configuration (preferences) for this\n"
diff --git a/camlibs/sierra/olympus-desc.c b/camlibs/sierra/olympus-desc.c
index 5ee949397..3bd55ab9c 100644
--- a/camlibs/sierra/olympus-desc.c
+++ b/camlibs/sierra/olympus-desc.c
@@ -12,10 +12,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -37,13 +37,13 @@
*/
/*
- * Notes:
+ * Notes:
*
* The variable "value" in a ValueNameType is the first element of
* the name/value union, and so it is the default value initialized.
*
* To init to a range, use:
- * { .range = { 100.1, 2000.0, 10 } }, NULL
+ * { .range = { 100.1, 2000.0, 10 } }, NULL
*
* Casts are used to avoid warnings about using a const.
*
@@ -100,9 +100,9 @@ static const ValueNameType oly3040_reg_01_val_names[] = {
{ { 0x25 }, "2048x1536-TIFF" },
{ { 0x26 }, "1360x1024-TIFF" },
};
-static const RegisterDescriptorType oly3040_reg_01[] = {
+static const RegisterDescriptorType oly3040_reg_01[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"resolution", N_("Resolution plus Size"),
VAL_NAME_INIT (oly3040_reg_01_val_names)
}
@@ -130,9 +130,9 @@ static const ValueNameType oly750uz_reg_01_val_names[] = {
{ { 0x26 }, "TIFF-2218x1712" },
{ { 0x27 }, "3:2-TIFF-2218x1712" },
};
-static const RegisterDescriptorType oly750uz_reg_01[] = {
+static const RegisterDescriptorType oly750uz_reg_01[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"resolution", N_("Resolution plus Size"),
VAL_NAME_INIT (oly750uz_reg_01_val_names)
}
@@ -159,9 +159,9 @@ static const ValueNameType olysp500uz_reg_01_val_names[] = {
{ { 0x10107 }, "HQ?-2816x1880-3:2" },
{ { 0x107 }, "HQ?-2816x2112-3:2" },
};
-static const RegisterDescriptorType olysp500uz_reg_01[] = {
+static const RegisterDescriptorType olysp500uz_reg_01[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"resolution", N_("Resolution plus Size"),
VAL_NAME_INIT (olysp500uz_reg_01_val_names)
}
@@ -171,15 +171,15 @@ static const RegisterDescriptorType olysp500uz_reg_01[] = {
* Register 2: Date and time.
*/
static const ValueNameType oly3040_reg_02_val_names[] = {
- /*
+ /*
* Dummy value, since we need at least one of these to
* display anything.
*/
{ { 0x00 }, "Dummy" },
};
-static const RegisterDescriptorType oly3040_reg_02[] = {
+static const RegisterDescriptorType oly3040_reg_02[] = {
{
- GP_WIDGET_DATE, GP_REG_NO_MASK,
+ GP_WIDGET_DATE, GP_REG_NO_MASK,
"date-time", N_("Date and time (GMT)"),
VAL_NAME_INIT (oly3040_reg_02_val_names)
}
@@ -192,7 +192,7 @@ static const RegisterDescriptorType oly3040_reg_02[] = {
*
* Possibly could be any other value in the range of 1250 and 16M
*/
-static const ValueNameType oly3040_reg_03_val_names[] = {
+static const ValueNameType oly3040_reg_03_val_names[] = {
{ { 0 }, N_("Auto") },
{ { 1250 }, "1/800" },
{ { 2000 }, "1/500" },
@@ -223,15 +223,15 @@ static const ValueNameType oly3040_reg_03_val_names[] = {
{ {16000000 }, "16" },
};
-static const RegisterDescriptorType oly3040_reg_03[] = {
+static const RegisterDescriptorType oly3040_reg_03[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"shutter", N_("Shutter Speed (in seconds)"),
VAL_NAME_INIT (oly3040_reg_03_val_names)
}
};
-static const ValueNameType oly750uz_reg_03_val_names[] = {
+static const ValueNameType oly750uz_reg_03_val_names[] = {
{ { 0 }, N_("Auto") },
{ { 1000 }, "1/1000" },
{ { 1250 }, "1/800" },
@@ -277,21 +277,21 @@ static const ValueNameType oly750uz_reg_03_val_names[] = {
{ {13000000 }, "13" },
{ {16000000 }, "16" },
};
-static const RegisterDescriptorType oly750uz_reg_03[] = {
+static const RegisterDescriptorType oly750uz_reg_03[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"shutter", N_("Shutter Speed (in seconds)"),
VAL_NAME_INIT (oly750uz_reg_03_val_names)
}
};
-static const ValueNameType olysp500uz_reg_03_val_names[] = {
+static const ValueNameType olysp500uz_reg_03_val_names[] = {
{ { 0 }, N_("Auto") },
{ { 250 }, "1/4000" },
- { { 313 }, "1/3200" },
+ { { 313 }, "1/3200" },
{ { 400 }, "1/2500" },
{ { 500 }, "1/2000" },
- { { 625 }, "1/1600" },
+ { { 625 }, "1/1600" },
{ { 800 }, "1/1250" },
{ { 1000 }, "1/1000" },
{ { 1250 }, "1/800" },
@@ -337,9 +337,9 @@ static const ValueNameType olysp500uz_reg_03_val_names[] = {
{ {13000000 }, "13" },
{ {16000000 }, "16" },
};
-static const RegisterDescriptorType olysp500uz_reg_03[] = {
+static const RegisterDescriptorType olysp500uz_reg_03[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"shutter", N_("Shutter Speed (in seconds)"),
VAL_NAME_INIT (olysp500uz_reg_03_val_names)
}
@@ -350,14 +350,14 @@ static const RegisterDescriptorType olysp500uz_reg_03[] = {
* does not work well, since only about 30 of some 16 million values are
* valid.
*/
-static const ValueNameType olyrange_reg_03_val_names[] = {
+static const ValueNameType olyrange_reg_03_val_names[] = {
{
- { .range = { 0, 16000000, 100 } }, NULL
+ { .range = { 0, 16000000, 100 } }, NULL
}
};
-static const RegisterDescriptorType olyrange_reg_03[] = {
+static const RegisterDescriptorType olyrange_reg_03[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"shutter", N_("Shutter Speed microseconds (0 auto)"),
VAL_NAME_INIT (olyrange_reg_03_val_names)
}
@@ -386,9 +386,9 @@ static const ValueNameType oly3040_reg_05_val_names[] = {
{ { 15 }, "F9" },
{ { 16 }, "F10" },
};
-static const RegisterDescriptorType oly3040_reg_05[] = {
+static const RegisterDescriptorType oly3040_reg_05[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"aperture", N_("Aperture Settings"),
VAL_NAME_INIT (oly3040_reg_05_val_names)
}
@@ -418,9 +418,9 @@ static const ValueNameType oly3000z_reg_05_val_names[] = {
{ { 15 }, "F11.0" },
{ { 16 }, "F2.0" }, /* Odd */
};
-static const RegisterDescriptorType oly3000z_reg_05[] = {
+static const RegisterDescriptorType oly3000z_reg_05[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"aperture", N_("Aperture Settings"),
VAL_NAME_INIT (oly3000z_reg_05_val_names)
}
@@ -442,9 +442,9 @@ static const ValueNameType oly750uz_reg_05_val_names[] = {
{ { 11 }, "F7.0" },
{ { 12 }, "F8.0" },
};
-static const RegisterDescriptorType oly750uz_reg_05[] = {
+static const RegisterDescriptorType oly750uz_reg_05[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"aperture", N_("Aperture Settings"),
VAL_NAME_INIT (oly750uz_reg_05_val_names)
}
@@ -466,9 +466,9 @@ static const ValueNameType olysp500uz_reg_05_val_names[] = {
{ { 80 }, "F8.0" },
{ { 90 }, "F9.0" },
};
-static const RegisterDescriptorType olysp500uz_reg_05[] = {
+static const RegisterDescriptorType olysp500uz_reg_05[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"aperture", N_("Aperture Settings"),
VAL_NAME_INIT (olysp500uz_reg_05_val_names)
}
@@ -483,9 +483,9 @@ static const ValueNameType oly3040_reg_06_val_names[] = {
{ { 3 }, N_("White board") },
{ { 4 }, N_("Black board") },
};
-static const RegisterDescriptorType oly3040_reg_06[] = {
+static const RegisterDescriptorType oly3040_reg_06[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"color", N_("Color or Function Mode"),
VAL_NAME_INIT (oly3040_reg_06_val_names)
}
@@ -500,10 +500,10 @@ static const ValueNameType oly3040_reg_07_val_names[] = {
{ { 2 }, N_("Off") },
{ { 3 }, N_("Anti-redeye") },
};
-static const RegisterDescriptorType oly3040_reg_07[] = {
+static const RegisterDescriptorType oly3040_reg_07[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "flash", N_("Flash Settings"),
+ "flash", N_("Flash Settings"),
VAL_NAME_INIT (oly3040_reg_07_val_names)
}
};
@@ -516,13 +516,13 @@ static const ValueNameType oly750uz_reg_07_val_names[] = {
{ { 1 }, N_("Force") },
{ { 2 }, N_("Off") },
{ { 3 }, N_("Anti-redeye") },
- { { 4 }, N_("Slow") },
+ { { 4 }, N_("Slow") },
/* This is always 4 for slow 1, 2, or slow with redeye */
};
-static const RegisterDescriptorType oly750uz_reg_07[] = {
+static const RegisterDescriptorType oly750uz_reg_07[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "flash", N_("Flash Settings"),
+ "flash", N_("Flash Settings"),
VAL_NAME_INIT (oly750uz_reg_07_val_names)
}
};
@@ -535,15 +535,15 @@ static const ValueNameType olysp500uz_reg_07_val_names[] = {
{ { 1 }, N_("Force") },
{ { 2 }, N_("Off") },
{ { 3 }, N_("Anti-redeye") },
- { { 4 }, N_("Slow") },
+ { { 4 }, N_("Slow") },
/* This is always 4 for slow 1, 2, or slow with redeye */
- { { 6 }, N_("Anti-redeye Fill") },
+ { { 6 }, N_("Anti-redeye Fill") },
};
-static const RegisterDescriptorType olysp500uz_reg_07[] = {
+static const RegisterDescriptorType olysp500uz_reg_07[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "flash", N_("Flash Settings"),
+ "flash", N_("Flash Settings"),
VAL_NAME_INIT (olysp500uz_reg_07_val_names)
}
};
@@ -558,7 +558,7 @@ static const ValueNameType oly3040_reg_20_val_names[] = {
{ { 0x03 }, N_("Tungsten") },
{ { 0xff }, N_("Cloudy") },
};
-static const RegisterDescriptorType oly3040_reg_20[] = {
+static const RegisterDescriptorType oly3040_reg_20[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"whitebalance", N_("White Balance"),
@@ -577,7 +577,7 @@ static const ValueNameType oly3000z_reg_20_val_names[] = {
{ { 0x03 }, N_("Tungsten") },
{ { 0x04 }, N_("Cloudy") },
};
-static const RegisterDescriptorType oly3000z_reg_20[] = {
+static const RegisterDescriptorType oly3000z_reg_20[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"whitebalance", N_("White Balance"),
@@ -598,7 +598,7 @@ static const ValueNameType oly750uz_reg_20_val_names[] = {
{ { 0x06 }, N_("Fluorescent-3-office-4200K") },
{ { 0xff }, N_("Cloudy") },
};
-static const RegisterDescriptorType oly750uz_reg_20[] = {
+static const RegisterDescriptorType oly750uz_reg_20[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"whitebalance", N_("White Balance"),
@@ -622,7 +622,7 @@ static const ValueNameType olysp500uz_reg_20_val_names[] = {
{ { 0xff }, N_("Cloudy") },
};
-static const RegisterDescriptorType olysp500uz_reg_20[] = {
+static const RegisterDescriptorType olysp500uz_reg_20[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"whitebalance", N_("White Balance"),
@@ -638,7 +638,7 @@ static const ValueNameType oly3040_reg_33_val_names[] = {
{ { 0x02 }, N_("Auto") },
{ { 0x03 }, N_("Manual") },
};
-static const RegisterDescriptorType oly3040_reg_33[] = {
+static const RegisterDescriptorType oly3040_reg_33[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"focus-mode", N_("Focus Mode"),
@@ -659,9 +659,9 @@ static const ValueNameType oly3040_reg_34_val_names[] = {
{ { 0x02 }, N_("Monitor") },
{ { 0x03 }, N_("Normal") },
};
-static const RegisterDescriptorType oly3040_reg_34[] = {
+static const RegisterDescriptorType oly3040_reg_34[] = {
{
- GP_WIDGET_RADIO, GP_REG_NO_MASK,
+ GP_WIDGET_RADIO, GP_REG_NO_MASK,
"lcd-mode", N_("LCD Mode"),
VAL_NAME_INIT (oly3040_reg_34_val_names)
}
@@ -674,7 +674,7 @@ static const RegisterDescriptorType oly3040_reg_34[] = {
static const ValueNameType oly3040_reg_35_val_names[] = {
{ { .range = { 0, 7 } }, NULL },
};
-static const RegisterDescriptorType oly3040_reg_35[] = {
+static const RegisterDescriptorType oly3040_reg_35[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"lcd-brightness", N_("LCD Brightness"),
@@ -688,7 +688,7 @@ static const RegisterDescriptorType oly3040_reg_35[] = {
static const ValueNameType oly3040_reg_24_val_names[] = {
{ { .range = { 30, 600, 30 } }, NULL },
};
-static const RegisterDescriptorType oly3040_reg_24[] = {
+static const RegisterDescriptorType oly3040_reg_24[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"camera-power-save", N_("Camera power save (seconds)"),
@@ -703,7 +703,7 @@ static const RegisterDescriptorType oly3040_reg_24[] = {
static const ValueNameType oly3040_reg_23_val_names[] = {
{ { .range = { 30, 600, 30 } }, NULL },
};
-static const RegisterDescriptorType oly3040_reg_23[] = {
+static const RegisterDescriptorType oly3040_reg_23[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"host-power-save", N_("Host power save (seconds)"),
@@ -716,7 +716,7 @@ static const RegisterDescriptorType oly3040_reg_23[] = {
static const ValueNameType oly3040_reg_38_val_names[] = {
{ { .range = { 30, 600, 30 } }, NULL },
};
-static const RegisterDescriptorType oly3040_reg_38[] = {
+static const RegisterDescriptorType oly3040_reg_38[] = {
{
GP_WIDGET_RANGE, GP_REG_NO_MASK,
"lcd-auto-shutoff", N_("LCD Auto Shut Off (seconds)"),
@@ -733,7 +733,7 @@ static const ValueNameType oly3040_reg_53_val_names[] = {
{ { 0x04 }, N_("French") },
{ { 0x05 }, N_("German") },
};
-static const RegisterDescriptorType oly3040_reg_53[] = {
+static const RegisterDescriptorType oly3040_reg_53[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
"language", N_("Language"),
@@ -760,9 +760,9 @@ static const ValueNameType oly3040_reg_69_val_names[] = {
{ { +17 }, "+1.7" },
{ { +20 }, "+2.0" },
};
-static const RegisterDescriptorType oly3040_reg_69[] = {
+static const RegisterDescriptorType oly3040_reg_69[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"exp", N_("Exposure Compensation"),
VAL_NAME_INIT (oly3040_reg_69_val_names)
}
@@ -775,10 +775,10 @@ static const ValueNameType oly3040_reg_70_val_names[] = {
{ { 0x03 }, N_("Spot") },
{ { 0x05 }, N_("Matrix") },
};
-static const RegisterDescriptorType oly3040_reg_70[] = {
+static const RegisterDescriptorType oly3040_reg_70[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "exp-meter", N_("Exposure Metering"),
+ "exp-meter", N_("Exposure Metering"),
VAL_NAME_INIT (oly3040_reg_70_val_names)
}
};
@@ -793,10 +793,10 @@ static const ValueNameType olysp500uz_reg_70_val_names[] = {
{ { 0x05 }, N_("Matrix") },
};
-static const RegisterDescriptorType olysp500uz_reg_70[] = {
+static const RegisterDescriptorType olysp500uz_reg_70[] = {
{
GP_WIDGET_RADIO, GP_REG_NO_MASK,
- "exp-meter", N_("Exposure Metering"),
+ "exp-meter", N_("Exposure Metering"),
VAL_NAME_INIT (olysp500uz_reg_70_val_names)
}
};
@@ -809,9 +809,9 @@ static const ValueNameType oly750uz_reg_71_val_names[] = {
{ .range = { 6.3, 63.0, .1 } }, NULL
}
};
-static const RegisterDescriptorType oly750uz_reg_71[] = {
+static const RegisterDescriptorType oly750uz_reg_71[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"zoom", N_("Zoom (in millimeters)"),
VAL_NAME_INIT (oly750uz_reg_71_val_names)
}
@@ -825,9 +825,9 @@ static const ValueNameType olysp500uz_reg_71_val_names[] = {
{ .range = { 6.3, 63.0, .3 } }, NULL
}
};
-static const RegisterDescriptorType olysp500uz_reg_71[] = {
+static const RegisterDescriptorType olysp500uz_reg_71[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"zoom", N_("Zoom (in millimeters)"),
VAL_NAME_INIT (olysp500uz_reg_71_val_names)
}
@@ -841,9 +841,9 @@ static const ValueNameType oly3040_reg_71_val_names[] = {
{ .range = { 7.3, 21.0, .1 } }, NULL
}
};
-static const RegisterDescriptorType oly3040_reg_71[] = {
+static const RegisterDescriptorType oly3040_reg_71[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"zoom", N_("Zoom (in millimeters)"),
VAL_NAME_INIT (oly3040_reg_71_val_names)
}
@@ -858,9 +858,9 @@ static const ValueNameType oly3040_reg_72_val_names[] = {
{ { 0x0008 }, "2x" },
{ { 0x0408 }, "2.5x" },
};
-static const RegisterDescriptorType oly3040_reg_72[] = {
+static const RegisterDescriptorType oly3040_reg_72[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"dzoom", N_("Digital zoom"),
VAL_NAME_INIT (oly3040_reg_72_val_names)
}
@@ -875,9 +875,9 @@ static const ValueNameType oly3040_reg_85_val_names[] = {
{ { 2 }, "200" },
{ { 3 }, "400" },
};
-static const RegisterDescriptorType oly3040_reg_85[] = {
+static const RegisterDescriptorType oly3040_reg_85[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"iso", N_("ISO Speed"),
VAL_NAME_INIT (oly3040_reg_85_val_names)
}
@@ -893,9 +893,9 @@ static const ValueNameType oly750uz_reg_85_val_names[] = {
{ { 3 }, "400" },
{ { 4 }, "50" },
};
-static const RegisterDescriptorType oly750uz_reg_85[] = {
+static const RegisterDescriptorType oly750uz_reg_85[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"iso", N_("ISO Speed"),
VAL_NAME_INIT (oly750uz_reg_85_val_names)
}
@@ -909,9 +909,9 @@ static const RegisterDescriptorType oly750uz_reg_85[] = {
static const ValueNameType oly3040_reg_103_val_names[] = {
{ { .range = { 1, 240, 1 } }, NULL },
};
-static const RegisterDescriptorType oly3040_reg_103[] = {
+static const RegisterDescriptorType oly3040_reg_103[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"focus-pos", N_("Focus position"),
VAL_NAME_INIT (oly3040_reg_103_val_names)
}
@@ -925,9 +925,9 @@ static const RegisterDescriptorType oly3040_reg_103[] = {
static const ValueNameType oly750uz_reg_103_val_names[] = {
{ { .range = { 1, 120, 1 } }, NULL },
};
-static const RegisterDescriptorType oly750uz_reg_103[] = {
+static const RegisterDescriptorType oly750uz_reg_103[] = {
{
- GP_WIDGET_RANGE, GP_REG_NO_MASK,
+ GP_WIDGET_RANGE, GP_REG_NO_MASK,
"focus-pos", N_("Focus position"),
VAL_NAME_INIT (oly750uz_reg_103_val_names)
}
@@ -942,9 +942,9 @@ static const ValueNameType oly3040_reg_41_val_names[] = {
{ { 2 }, "mmddyy" },
{ { 3 }, "ddmmyy" },
};
-static const RegisterDescriptorType oly3040_reg_41[] = {
+static const RegisterDescriptorType oly3040_reg_41[] = {
{
- GP_WIDGET_MENU, GP_REG_NO_MASK,
+ GP_WIDGET_MENU, GP_REG_NO_MASK,
"timefmt", N_("Time format"),
VAL_NAME_INIT (oly3040_reg_41_val_names)
}
@@ -999,7 +999,7 @@ static CameraRegisterType oly3000z_pic_regs[] = {
*/
static CameraRegisterType oly3040_cam_regs[] = {
CAM_REG_TYPE_INIT (oly3040, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
- CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
+ CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
SIERRA_ACTION_LCD_MODE), /* lcd mode */
CAM_REG_TYPE_INIT (oly3040, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
CAM_REG_TYPE_INIT (oly3040, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
@@ -1009,12 +1009,12 @@ static CameraRegisterType oly3040_cam_regs[] = {
};
static const CameraRegisterSetType oly3040_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, oly3040_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, oly3040_cam_regs)
},
};
@@ -1054,7 +1054,7 @@ static CameraRegisterType oly750uz_pic_regs[] = {
*/
static CameraRegisterType oly750uz_cam_regs[] = {
CAM_REG_TYPE_INIT (oly3040, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
- CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
+ CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
SIERRA_ACTION_LCD_MODE), /* lcd mode */
CAM_REG_TYPE_INIT (oly3040, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
CAM_REG_TYPE_INIT (oly3040, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
@@ -1098,7 +1098,7 @@ static CameraRegisterType olysp500uz_pic_regs[] = {
*/
static CameraRegisterType olysp500uz_cam_regs[] = {
CAM_REG_TYPE_INIT (oly3040, 02, 4, CAM_DESC_DEFAULT, 0), /* date-time */
- CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
+ CAM_REG_TYPE_INIT (oly3040, 34, 4, CAM_DESC_SUBACTION,
SIERRA_ACTION_LCD_MODE), /* lcd mode */
CAM_REG_TYPE_INIT (oly3040, 35, 4, CAM_DESC_DEFAULT, 0), /* LCD brightness */
CAM_REG_TYPE_INIT (oly3040, 38, 4, CAM_DESC_DEFAULT, 0), /* LCD auto shutoff */
@@ -1108,36 +1108,36 @@ static CameraRegisterType olysp500uz_cam_regs[] = {
};
static const CameraRegisterSetType olysp500uz_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, olysp500uz_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, olysp500uz_cam_regs)
},
};
static const CameraRegisterSetType oly750uz_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, oly750uz_pic_regs)
},
- {
- N_("Camera Settings"),
+ {
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, oly750uz_cam_regs)
},
};
static const CameraRegisterSetType oly3000z_desc[] = {
- {
- N_("Picture Settings"),
+ {
+ N_("Picture Settings"),
SIZE_ADDR (CameraRegisterType, oly3000z_pic_regs)
},
- {
+ {
/*
* Assumed that these are all the same as the 3040
*/
- N_("Camera Settings"),
+ N_("Camera Settings"),
SIZE_ADDR (CameraRegisterType, oly3040_cam_regs)
},
};
@@ -1177,7 +1177,7 @@ N_(
" PC, then switch LCD to 'Off'."
);
-static const char default_manual[] =
+static const char default_manual[] =
N_(
"Default sierra driver:\n\n"
" This is the default sierra driver, it\n"
diff --git a/camlibs/sierra/sierra-desc.c b/camlibs/sierra/sierra-desc.c
index cfdf669e8..d100b5c18 100644
--- a/camlibs/sierra/sierra-desc.c
+++ b/camlibs/sierra/sierra-desc.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -59,14 +59,14 @@
*/
extern double round(double x);
-static int
-camera_cam_desc_get_value (ValueNameType *val_name_p, CameraWidgetType widge,
- uint32_t reg_len, void *buff, int mask,
+static int
+camera_cam_desc_get_value (ValueNameType *val_name_p, CameraWidgetType widge,
+ uint32_t reg_len, void *buff, int mask,
CameraWidget *child)
{
if ((widge == GP_WIDGET_RADIO) || (widge == GP_WIDGET_MENU)) {
gp_widget_add_choice (child, _(val_name_p->name));
- GP_DEBUG ("get value %15s:\t%lld (0x%04llx)",
+ GP_DEBUG ("get value %15s:\t%lld (0x%04llx)",
val_name_p->name, (long long)val_name_p->u.value,
(long long unsigned) val_name_p->u.value);
/* XXX where is endian handled? */
@@ -81,15 +81,15 @@ camera_cam_desc_get_value (ValueNameType *val_name_p, CameraWidgetType widge,
increment = val_name_p->u.range[2];
if (increment == 0.0) {
- /*
+ /*
* Use a default value.
*/
increment = 1.0;
}
- GP_DEBUG ("get value range:\t%08g:%08g increment %g (via %g)",
+ GP_DEBUG ("get value range:\t%08g:%08g increment %g (via %g)",
val_name_p->u.range[0], val_name_p->u.range[1],
increment, val_name_p->u.range[2]);
- gp_widget_set_range (child, val_name_p->u.range[0],
+ gp_widget_set_range (child, val_name_p->u.range[0],
val_name_p->u.range[1], increment);
/*
* Kluge: store the value in buff as a 4 byte int, even
@@ -109,7 +109,7 @@ camera_cam_desc_get_value (ValueNameType *val_name_p, CameraWidgetType widge,
}
static int
-camera_cam_desc_get_widget (Camera *camera, CameraRegisterType *reg_p,
+camera_cam_desc_get_widget (Camera *camera, CameraRegisterType *reg_p,
CameraWidget *section, GPContext *context)
{
int ind, vind, ret, value;
@@ -138,7 +138,7 @@ camera_cam_desc_get_widget (Camera *camera, CameraRegisterType *reg_p,
* value, change the reg_value size, or allocate space on
* the fly and make a union with reg_value and a void*.
*/
- ret = sierra_get_string_register (camera, reg_p->reg_number,
+ ret = sierra_get_string_register (camera, reg_p->reg_number,
-1, NULL, (unsigned char *)buff, (unsigned int *)&value, context);
if ((ret == GP_OK) && value != reg_p->reg_len) {
GP_DEBUG ("Bad length result %d", value);
@@ -158,7 +158,7 @@ camera_cam_desc_get_widget (Camera *camera, CameraRegisterType *reg_p,
reg_desc_p = &reg_p->reg_desc[ind];
mask = reg_desc_p->regs_mask;
GP_DEBUG ("window name is %s", reg_desc_p->regs_long_name);
- gp_widget_new (reg_desc_p->reg_widget_type,
+ gp_widget_new (reg_desc_p->reg_widget_type,
_(reg_desc_p->regs_long_name), &child);
gp_widget_set_name (child, reg_desc_p->regs_short_name);
/*
@@ -180,8 +180,8 @@ camera_cam_desc_get_widget (Camera *camera, CameraRegisterType *reg_p,
* For radio and menu values: if there has been no change, it
* means the value was not set, and so it is unknown.
*/
- if (((reg_desc_p->reg_widget_type == GP_WIDGET_RADIO) ||
- (reg_desc_p->reg_widget_type == GP_WIDGET_MENU)) &&
+ if (((reg_desc_p->reg_widget_type == GP_WIDGET_RADIO) ||
+ (reg_desc_p->reg_widget_type == GP_WIDGET_MENU)) &&
!gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
sprintf (buff, _("%lld (unknown)"), (long long)reg_p->reg_value);
@@ -251,7 +251,7 @@ cam_desc_set_register (Camera *camera, CameraRegisterType *reg_p,
* protection mode. Just make sure the LCD mode setting
* works.
*/
- CHECK_STOP (camera, sierra_sub_action (camera,
+ CHECK_STOP (camera, sierra_sub_action (camera,
reg_p->reg_get_set.action, *(int*) value,
context));
} else {
@@ -262,7 +262,7 @@ cam_desc_set_register (Camera *camera, CameraRegisterType *reg_p,
return (GP_OK);
}
-static int
+static int
camera_cam_desc_set_value (Camera *camera, CameraRegisterType *reg_p,
RegisterDescriptorType *reg_desc_p,
ValueNameType *val_name_p, void *data,
@@ -271,7 +271,7 @@ camera_cam_desc_set_value (Camera *camera, CameraRegisterType *reg_p,
/*
* Return GP_OK if match and OK, 1 if no match, or < 0 on error.
*/
- if ((reg_desc_p->reg_widget_type == GP_WIDGET_RADIO) ||
+ if ((reg_desc_p->reg_widget_type == GP_WIDGET_RADIO) ||
(reg_desc_p->reg_widget_type == GP_WIDGET_MENU)) {
uint32_t new_value;
@@ -284,7 +284,7 @@ camera_cam_desc_set_value (Camera *camera, CameraRegisterType *reg_p,
* For masking, we might actually set the same register
* twice - once for each change in the mask, so we have to
* reset reg_value to the new value.
- *
+ *
* If we must to mask u.value, that is really a bug - the
* u.value should already be masked.
*
@@ -332,8 +332,8 @@ camera_cam_desc_set_value (Camera *camera, CameraRegisterType *reg_p,
increment);
val[0] = round ((*(float*) data) / increment);
if (reg_p->reg_len == 4) {
- /*
- * not used but set it anyway
+ /*
+ * not used but set it anyway
*/
val[1] = 0;
} else if (reg_p->reg_len == 8) {
@@ -346,10 +346,10 @@ camera_cam_desc_set_value (Camera *camera, CameraRegisterType *reg_p,
}
GP_DEBUG ("set value range to %d (0x%x and 0x%x)", val[0],
val[0], val[1]);
- CHECK_STOP (camera, cam_desc_set_register (camera, reg_p,
+ CHECK_STOP (camera, cam_desc_set_register (camera, reg_p,
&val, context));
} else {
- GP_DEBUG ("bad reg_widget_type type %d",
+ GP_DEBUG ("bad reg_widget_type type %d",
reg_desc_p->reg_widget_type);
return (GP_ERROR);
}
@@ -419,7 +419,7 @@ camera_cam_desc_set_widget (Camera *camera, CameraRegisterType *reg_p,
return (GP_OK);
}
-int
+int
camera_set_config_cam_desc (Camera *camera, CameraWidget *window,
GPContext *context)
{
diff --git a/camlibs/sierra/sierra-desc.h b/camlibs/sierra/sierra-desc.h
index e9fd0a789..cf0d4c37e 100644
--- a/camlibs/sierra/sierra-desc.h
+++ b/camlibs/sierra/sierra-desc.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -69,7 +69,7 @@ typedef struct {
typedef struct {
union {
- /*
+ /*
* The register value masked with regs_mask gives the
* register value to compare or use here. Register values
* are always int, and must be converted to/from float for
@@ -87,7 +87,7 @@ typedef struct {
a stepping of one is used. */
CameraWidgetCallback callback; /* GP_WIDGET_BUTTON */
} u;
- /*
+ /*
* Range uses no name - the name is implicitly the value. XXX Move name
* up into a struct with value.
*/
@@ -103,7 +103,7 @@ typedef struct {
ValueNameType *regs_value_names; /* list of reg value/names */
} RegisterDescriptorType;
-/*
+/*
* XXX check usage of reg_value, maybe change it to char x[8], and
* normally type cast its usage.
*/
diff --git a/camlibs/sierra/sierra-usbwrap.c b/camlibs/sierra/sierra-usbwrap.c
index 8ca4b6bbb..449300fb6 100644
--- a/camlibs/sierra/sierra-usbwrap.c
+++ b/camlibs/sierra/sierra-usbwrap.c
@@ -8,22 +8,22 @@
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
- *
+ *
*
* Olympus C-3040Z (and possibly also the C-2040Z and others) have
* a USB PC Control mode in which "Sierra" protocol packets are tunneled
* inside another protocol. This file implements the wrapper protocol.
* The (ab)use of USB clear halt is not needed for this protocol.
- *
+ *
* The other protocol is "SCSI via USB Mass Storage", so we can also use
* the Linux SCSI APIs. Interesting is also that the header looks a bit
* like a PTP header.
@@ -138,7 +138,7 @@ typedef struct
unsigned char flags; /* in / out flag mostly */
unsigned char lun; /* 0 here */
unsigned char length; /* of the CDB... but 0x0c is used here in the traces */
- unsigned char cdb[16];
+ unsigned char cdb[16];
} uw_header_t;
/*
@@ -373,7 +373,7 @@ usb_wrap_CMND(gp_port* dev, unsigned int type, char* sierra_msg, int sierra_len)
int ret, msg_len = sizeof(*msg) + sierra_len;
char sense_buffer[32];
uw_scsicmd_t cmd;
-
+
GP_DEBUG( "usb_wrap_CMND" );
memset(&cmd, 0, sizeof(cmd));
@@ -387,7 +387,7 @@ usb_wrap_CMND(gp_port* dev, unsigned int type, char* sierra_msg, int sierra_len)
memcpy((char*)msg + sizeof(*msg), sierra_msg, sierra_len);
GP_DEBUG( "usb_wrap_CMND writing %i", msg_len);
-
+
ret = gp_port_send_scsi_cmd (dev, 1, (char*)&cmd, sizeof(cmd),
sense_buffer, sizeof(sense_buffer), (char*)msg, msg_len);
free(msg);
@@ -408,7 +408,7 @@ usb_wrap_SIZE(gp_port* dev, unsigned int type, uw32_t* size)
int ret;
char sense_buffer[32];
uw_scsicmd_t cmd;
-
+
GP_DEBUG( "usb_wrap_SIZE" );
memset(&cmd, 0, sizeof(cmd));
@@ -499,7 +499,7 @@ usb_wrap_write_packet (GPPort *dev, unsigned int type, char *sierra_msg, int sie
CR (usb_wrap_RDY (dev, type));
CR (usb_wrap_CMND (dev, type, sierra_msg, sierra_len));
CR (usb_wrap_STAT (dev, type));
-
+
return GP_OK;
}
@@ -514,6 +514,6 @@ usb_wrap_read_packet (GPPort *dev, unsigned int type, char *sierra_response, int
CR (usb_wrap_SIZE (dev, type, &uw_size));
CR (usb_wrap_DATA (dev, type, sierra_response, &sierra_len, uw_size));
CR (usb_wrap_STAT (dev, type));
-
+
return sierra_len;
}
diff --git a/camlibs/sierra/sierra-usbwrap.h b/camlibs/sierra/sierra-usbwrap.h
index 1d0ed7c32..33fd75b6f 100644
--- a/camlibs/sierra/sierra-usbwrap.h
+++ b/camlibs/sierra/sierra-usbwrap.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/sierra/sierra.c b/camlibs/sierra/sierra.c
index 5db776bef..59fcc2389 100644
--- a/camlibs/sierra/sierra.c
+++ b/camlibs/sierra/sierra.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -74,7 +74,7 @@ static struct {
} sierra_cameras[] = {
/* Manufacturer, Camera Model, Sierra Model,
USBvendor id, USB product id,
- USB wrapper protocol, CameraDesc) */
+ USB wrapper protocol, CameraDesc) */
{"Agfa", "ePhoto 307", SIERRA_MODEL_DEFAULT, 0, 0,
SIERRA_NO_51, NULL},
{"Agfa", "ePhoto 780", SIERRA_MODEL_DEFAULT, 0, 0, 0, NULL },
@@ -169,7 +169,7 @@ static struct {
{"Olympus", "C-900 Zoom", SIERRA_MODEL_OLYMPUS, 0, 0, 0, NULL },
{"Olympus", "C-900L Zoom", SIERRA_MODEL_OLYMPUS, 0, 0, 0, NULL },
- /* http://sourceforge.net/tracker/index.php?func=detail&aid=1082569&group_id=8874&atid=358874
+ /* http://sourceforge.net/tracker/index.php?func=detail&aid=1082569&group_id=8874&atid=358874
* strangely only works with low speed
*/
{"Olympus", "C-990 Zoom", SIERRA_MODEL_OLYMPUS, 0, 0, SIERRA_LOW_SPEED, NULL },
@@ -261,14 +261,14 @@ static struct {
{0, 0}
};
-int camera_id (CameraText *id)
+int camera_id (CameraText *id)
{
strcpy(id->text, "sierra");
return (GP_OK);
}
-int camera_abilities (CameraAbilitiesList *list)
+int camera_abilities (CameraAbilitiesList *list)
{
int x;
CameraAbilities a;
@@ -295,7 +295,7 @@ int camera_abilities (CameraAbilitiesList *list)
a.speed[2] = 38400;
if (sierra_cameras[x].flags & SIERRA_LOW_SPEED) {
/*
- * Camera supports 9600 -> 38400
+ * Camera supports 9600 -> 38400
*/
a.speed[3] = 0;
} else {
@@ -313,7 +313,7 @@ int camera_abilities (CameraAbilitiesList *list)
a.operations = GP_OPERATION_CAPTURE_IMAGE |
GP_OPERATION_CAPTURE_PREVIEW |
GP_OPERATION_CONFIG;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW |
GP_FILE_OPERATION_AUDIO;
a.folder_operations = GP_FOLDER_OPERATION_DELETE_ALL |
@@ -502,7 +502,7 @@ camera_start (Camera *camera, GPContext *context)
}
int
-camera_stop (Camera *camera, GPContext *context)
+camera_stop (Camera *camera, GPContext *context)
{
GP_DEBUG ("Closing connection");
@@ -518,7 +518,7 @@ camera_stop (Camera *camera, GPContext *context)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
GP_DEBUG ("sierra camera_exit");
@@ -592,7 +592,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
case GP_FILE_TYPE_AUDIO:
CHECK_STOP (camera, sierra_get_string_register (camera, 43, n, NULL,
(unsigned char *) &audio_info, &transferred, context));
- if (transferred == 0)
+ if (transferred == 0)
download_size = 0;
else
download_size = audio_info[0];
@@ -621,7 +621,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* * Thumbnails are always JPEG files (as far as we know...) */
CHECK (gp_file_set_mime_type (file, GP_MIME_JPEG));
- /*
+ /*
* Some camera (e.g. Epson 3000z) send the EXIF application
* data as thumbnail of a picture. The JPEG file need to be
* extracted. Equally for movies, the JPEG thumbnail is
@@ -649,7 +649,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
if (!strcmp (mime_type, GP_MIME_RAW))
CHECK (gp_file_set_mime_type (file, GP_MIME_QUICKTIME));
break;
-
+
case GP_FILE_TYPE_AUDIO:
CHECK (gp_file_set_mime_type (file, GP_MIME_WAV));
break;
@@ -681,8 +681,8 @@ delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
* Mick Grant <mickgr@drahthaar.clara.net> found out that his
* Nicon CoolPix 880 won't have deleted any picture at this point.
* It seems that those cameras just acknowledge the command but do
- * nothing in the end. Therefore, we have to count the number of
- * pictures that are now on the camera. If there indeed are any
+ * nothing in the end. Therefore, we have to count the number of
+ * pictures that are now on the camera. If there indeed are any
* pictures, return an error. libgphoto2 will then try to manually
* delete them one-by-one.
*/
@@ -695,7 +695,7 @@ delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
static int
delete_file_func (CameraFilesystem *fs, const char *folder,
- const char *filename, void *data, GPContext *context)
+ const char *filename, void *data, GPContext *context)
{
Camera *camera = data;
int n;
@@ -718,7 +718,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
/*
* The following command takes a while, and there is no way to add
* a nice progress bar, since it is a single sierra_action call.
- * so multiple gp_context_progress_update () calls can not add
+ * so multiple gp_context_progress_update () calls can not add
* anything.
*/
CHECK_STOP (camera, sierra_delete (camera, n + 1, context));
@@ -729,7 +729,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
static int
camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
- GPContext *context)
+ GPContext *context)
{
CHECK (camera_start (camera, context));
CHECK_STOP (camera, sierra_capture (camera, type, path, context));
@@ -765,7 +765,7 @@ put_file_func (CameraFilesystem * fs, const char *folder, const char *filename,
if (type != GP_FILE_TYPE_NORMAL)
return GP_ERROR_BAD_PARAMETERS;
-
+
/* Check the size */
CHECK (gp_file_get_data_and_size (file, &data_file, &data_size));
if ( data_size == 0 ) {
@@ -869,7 +869,7 @@ static void dump_register (Camera *camera, GPContext *context)
"spot metering mode", /* 70 */
"?",
"zoom",
- "?", "?", "?", "?", "?", "?",
+ "?", "?", "?", "?", "?", "?",
"current filename",
"?", /* 80 */
"?", "?",
@@ -886,14 +886,14 @@ static void dump_register (Camera *camera, GPContext *context)
"?", "?", "?", "?", "?", "?", "?", "?", "?",
"?" /* 130 */
};
-
+
GP_DEBUG ("*** Register:");
for (i = 0; i < 128; i++) {
ret = sierra_get_int_register (camera, i, &value, context);
if (ret >= 0)
GP_DEBUG (
- "*** %3i: %12i (%s)", i, value,
+ "*** %3i: %12i (%s)", i, value,
description [i]);
}
}
@@ -927,7 +927,7 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
gp_widget_add_choice (child, _("Standard"));
gp_widget_add_choice (child, _("High"));
gp_widget_add_choice (child, _("Best"));
-
+
switch (value) {
case 0: strcpy (t, _("Auto"));
break;
@@ -948,9 +948,9 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
/* Shutter Speed */
ret = sierra_get_int_register (camera, 3, &value, context);
if (ret >= 0) {
-
- gp_widget_new (GP_WIDGET_RANGE,
- _("Shutter Speed (microseconds, 0 auto)"),
+
+ gp_widget_new (GP_WIDGET_RANGE,
+ _("Shutter Speed (microseconds, 0 auto)"),
&child);
gp_widget_set_range (child, 0, 2000000, 1);
float_value = value;
@@ -1052,7 +1052,7 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
ret = sierra_get_int_register (camera, 19, &value, context);
if (ret >= 0) {
- gp_widget_new (GP_WIDGET_RADIO, _("Brightness/Contrast"),
+ gp_widget_new (GP_WIDGET_RADIO, _("Brightness/Contrast"),
&child);
gp_widget_add_choice (child, _("Normal"));
gp_widget_add_choice (child, _("Bright+"));
@@ -1082,7 +1082,7 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
/* White Balance */
ret = sierra_get_int_register (camera, 20, &value, context);
if (ret >= 0) {
-
+
gp_widget_new (GP_WIDGET_RADIO, _("White Balance"), &child);
gp_widget_add_choice (child, _("Auto"));
gp_widget_add_choice (child, _("Skylight"));
@@ -1137,8 +1137,8 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
/* Spot Metering Mode */
ret = sierra_get_int_register (camera, 70, &value, context);
if (ret >= 0) {
-
- gp_widget_new (GP_WIDGET_RADIO, _("Spot Metering Mode"),
+
+ gp_widget_new (GP_WIDGET_RADIO, _("Spot Metering Mode"),
&child);
gp_widget_add_choice (child, _("On"));
gp_widget_add_choice (child, _("Off"));
@@ -1191,7 +1191,7 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
/* Auto Off (host) */
ret = sierra_get_int_register (camera, 23, &value, context);
if (ret >= 0) {
-
+
gp_widget_new (GP_WIDGET_RANGE, _("Auto Off (host) "
"(in seconds)"), &child);
gp_widget_set_info (child, _("How long will it take until the "
@@ -1219,7 +1219,7 @@ camera_get_config_olympus (Camera *camera, CameraWidget **window, GPContext *con
/* LCD Brightness */
ret = sierra_get_int_register (camera, 35, &value, context);
if (ret >= 0) {
-
+
gp_widget_new (GP_WIDGET_RANGE, _("LCD Brightness"), &child);
gp_widget_set_range (child, 1, 7, 1);
gp_widget_set_value (child, &value);
@@ -1271,10 +1271,10 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
return (GP_ERROR_NOT_SUPPORTED);
CHECK_STOP (camera, sierra_set_int_register (camera, 1, i, context));
}
-
+
/* Shutter Speed */
GP_DEBUG ("*** setting shutter speed");
- if ((gp_widget_get_child_by_label (window,
+ if ((gp_widget_get_child_by_label (window,
_("Shutter Speed (microseconds, 0 auto)"), &child) >= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1285,7 +1285,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
/* Aperture */
GP_DEBUG ("*** setting aperture");
- if ((gp_widget_get_child_by_label (window, _("Aperture"), &child)
+ if ((gp_widget_get_child_by_label (window, _("Aperture"), &child)
>= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1350,7 +1350,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
/* Brightness/Contrast */
GP_DEBUG (
"*** setting brightness/contrast");
- if ((gp_widget_get_child_by_label (window, _("Brightness/Contrast"),
+ if ((gp_widget_get_child_by_label (window, _("Brightness/Contrast"),
&child) >= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1413,7 +1413,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
/* Spot Metering Mode */
GP_DEBUG (
"*** setting spot metering mode");
- if ((gp_widget_get_child_by_label (window, _("Spot Metering Mode"),
+ if ((gp_widget_get_child_by_label (window, _("Spot Metering Mode"),
&child) >= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1429,7 +1429,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
/* Zoom */
GP_DEBUG ("*** setting zoom");
- if ((gp_widget_get_child_by_label (window, _("Zoom"), &child)
+ if ((gp_widget_get_child_by_label (window, _("Zoom"), &child)
>= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1442,7 +1442,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
i = 520;
} else if (strcmp (value, "2.5x") == 0) {
i = 1032;
- } else
+ } else
return (GP_ERROR_NOT_SUPPORTED);
CHECK_STOP (camera, sierra_set_int_register (camera, 72, i, context));
}
@@ -1470,7 +1470,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
/* LCD Brightness */
GP_DEBUG ("*** setting lcd brightness");
- if ((gp_widget_get_child_by_label (window,
+ if ((gp_widget_get_child_by_label (window,
_("LCD Brightness"), &child) >= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1480,7 +1480,7 @@ camera_set_config_olympus (Camera *camera, CameraWidget *window, GPContext *cont
/* LCD Auto Off */
GP_DEBUG ("*** setting lcd auto off");
- if ((gp_widget_get_child_by_label (window,
+ if ((gp_widget_get_child_by_label (window,
_("LCD Auto Off (in seconds)"), &child) >= 0) &&
gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
@@ -1527,13 +1527,13 @@ camera_get_config_epson (Camera *camera, CameraWidget **window, GPContext *conte
break;
case 2: strcpy (t, _("F2.8"));
break;
- case 3: strcpy (t, _("F4"));
+ case 3: strcpy (t, _("F4"));
break;
- case 4: strcpy (t, _("F5.6"));
+ case 4: strcpy (t, _("F5.6"));
break;
- case 5: strcpy (t, _("F8"));
+ case 5: strcpy (t, _("F8"));
break;
- case 6: strcpy (t, _("auto"));
+ case 6: strcpy (t, _("auto"));
break;
default:
sprintf(t, _("%i (unknown)"), value);
@@ -1624,7 +1624,7 @@ camera_get_config_epson (Camera *camera, CameraWidget **window, GPContext *conte
gp_widget_add_choice (child, _("fine"));
gp_widget_add_choice (child, _("superfine"));
gp_widget_add_choice (child, _("HyPict"));
-
+
switch (value) {
case 1: strcpy (t, _("standard"));
break;
@@ -1667,7 +1667,7 @@ camera_get_config_epson (Camera *camera, CameraWidget **window, GPContext *conte
/* Auto Off (host) */
ret = sierra_get_int_register (camera, 23, &value, context);
if (ret >= 0) {
-
+
gp_widget_new (GP_WIDGET_RANGE, _("Auto Off (host) "
"(in seconds)"), &child);
gp_widget_set_info (child, _("How long will it take until the "
@@ -1753,7 +1753,7 @@ camera_set_config_epson (Camera *camera, CameraWidget *window, GPContext *contex
/* Aperture */
GP_DEBUG ("*** setting aperture");
- if ((gp_widget_get_child_by_label (window, _("Aperture"), &child)
+ if ((gp_widget_get_child_by_label (window, _("Aperture"), &child)
>= 0) && gp_widget_changed (child)) {
gp_widget_set_changed (child, FALSE);
gp_widget_get_value (child, &value);
@@ -1770,7 +1770,7 @@ camera_set_config_epson (Camera *camera, CameraWidget *window, GPContext *contex
} else if (strcmp (value, _("F8")) == 0) {
i = 5;
} else if (strcmp (value, _("auto")) == 0) {
- i = 6;
+ i = 6;
} else
return (GP_ERROR_NOT_SUPPORTED);
CHECK_STOP (camera, sierra_set_int_register (camera, 5, i, context));
@@ -1848,7 +1848,7 @@ camera_set_config_epson (Camera *camera, CameraWidget *window, GPContext *contex
return (GP_ERROR_NOT_SUPPORTED);
CHECK_STOP (camera, sierra_set_int_register (camera, 1, i, context));
}
-
+
/* Color Mode */
GP_DEBUG ("*** setting color mode");
if ((gp_widget_get_child_by_label (window, _("Color Mode"), &child)
@@ -1941,7 +1941,7 @@ camera_set_config_default (Camera *camera, CameraWidget *window, GPContext *cont
static int
-camera_summary (Camera *camera, CameraText *summary, GPContext *c)
+camera_summary (Camera *camera, CameraText *summary, GPContext *c)
{
char buf[1024*32];
int v, r;
@@ -2058,7 +2058,7 @@ storage_info_func (CameraFilesystem *fs,
}
static int
-camera_manual (Camera *camera, CameraText *manual, GPContext *context)
+camera_manual (Camera *camera, CameraText *manual, GPContext *context)
{
GP_DEBUG ("*** sierra camera_manual");
@@ -2083,7 +2083,7 @@ camera_manual (Camera *camera, CameraText *manual, GPContext *context)
break;
case SIERRA_MODEL_OLYMPUS:
default:
- strcpy (manual->text,
+ strcpy (manual->text,
_("Some notes about Olympus cameras (and others?):\n"
"(1) Camera Configuration:\n"
" A value of 0 will take the default one (auto).\n"
@@ -2106,11 +2106,11 @@ camera_manual (Camera *camera, CameraText *manual, GPContext *context)
}
static int
-camera_about (Camera *camera, CameraText *about, GPContext *context)
+camera_about (Camera *camera, CameraText *about, GPContext *context)
{
GP_DEBUG ("*** sierra camera_about");
-
- strcpy (about->text,
+
+ strcpy (about->text,
_("sierra SPARClite library\n"
"Scott Fritzinger <scottf@unr.edu>\n"
"Support for sierra-based digital cameras\n"
@@ -2147,7 +2147,7 @@ int get_jpeg_data(const char *data, int data_size, char **jpeg_data, int *jpeg_s
if (memcmp(data+i, JPEG_SOF_MARKER, 2) == 0)
sof_marker = data + i;
}
-
+
if (soi_marker && sof_marker) {
/* Valid JPEG data has been found: build the output table */
*jpeg_size = sof_marker - soi_marker + 2;
@@ -2178,7 +2178,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
int x = 0, ret, value;
int vendor=0;
diff --git a/camlibs/sierra/sierra.h b/camlibs/sierra/sierra.h
index 61a286388..67f269910 100644
--- a/camlibs/sierra/sierra.h
+++ b/camlibs/sierra/sierra.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/sipix/blink2.c b/camlibs/sipix/blink2.c
index e5151c6a9..f4413412a 100644
--- a/camlibs/sipix/blink2.c
+++ b/camlibs/sipix/blink2.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -60,7 +60,7 @@ blink2_getnumpics(
) {
unsigned char buf[2];
int ret;
-
+
ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, (char*)buf, 2);
if (ret < GP_OK)
return ret;
@@ -321,7 +321,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
unsigned int start, len;
int curread;
memset( buf, 0, sizeof(buf));
-
+
if (addrs[image_no].type)
gp_file_set_mime_type (file, GP_MIME_AVI);
else
@@ -388,7 +388,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
int ret;
unsigned int oldnumpics, numpics;
char buf[1];
-
+
ret = blink2_getnumpics (camera->port, context, &oldnumpics);
if (ret < GP_OK)
return ret;
@@ -417,7 +417,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -445,7 +445,7 @@ camera_abilities (CameraAbilitiesList *list)
}
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "SiPix Blink2");
return (GP_OK);
@@ -458,7 +458,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
char buf[6];
int ret;
diff --git a/camlibs/sipix/web2.c b/camlibs/sipix/web2.c
index 08e6f07d9..d5145aacc 100644
--- a/camlibs/sipix/web2.c
+++ b/camlibs/sipix/web2.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -70,7 +70,7 @@ web2_command(
fprintf(stderr,"\n");
}
#endif
- if (ret>=GP_OK)
+ if (ret>=GP_OK)
ret=GP_OK;
return ret;
}
@@ -192,7 +192,7 @@ web2_getpicture(GPPort *port, GPContext *context, CameraFile *file)
if (toread!=ret)
break;
if (gp_context_cancel (context) == GP_CONTEXT_FEEDBACK_CANCEL) {
- /* We need to read the rest too or the communication is in
+ /* We need to read the rest too or the communication is in
* an undefined state. */
wascanceled = 1;
}
@@ -253,7 +253,7 @@ web2_getnumpics(
*x1 = cmdbuf[0] | (cmdbuf[1] << 8); /* unclear */
*numpics = cmdbuf[2] | (cmdbuf[3] << 8);
*x3 = cmdbuf[4] | (cmdbuf[5] << 8); /* unclear */
-
+
/* sometimes looks like mem, sometimes it doesn't */
*freemem = cmdbuf[6] | (cmdbuf[7] << 8) | (cmdbuf[8] << 16) | (cmdbuf[9] << 24);
return GP_OK;
@@ -425,7 +425,7 @@ _cmd_26(GPPort *port, GPContext *context, int x) {
cmdbuf[2*i+0] = xshort[i] & 0xff;
cmdbuf[2*i+1] = (xshort[i] >> 8) & 0xff;
}
- return web2_command(port, 1, 0x26, 0x10, 0, cmdbuf, 6);
+ return web2_command(port, 1, 0x26, 0x10, 0, cmdbuf, 6);
case 1: xshort[0] = 364; /* 16c */
xshort[1] = 256; /* 100 */
xshort[2] = 596; /* 254 */
@@ -471,14 +471,14 @@ _cmd_fb(GPPort *port, GPContext *context, int *y) {
#endif
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "SiPix Web2");
return (GP_OK);
}
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -502,7 +502,7 @@ camera_abilities (CameraAbilitiesList *list)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
return web2_exit(camera->port, context);
}
@@ -631,7 +631,7 @@ camera_about (Camera *camera, CameraText *about, GPContext *context)
return (GP_OK);
}
-/*
+/*
* This function makes sure that the <index in folder> is <picture index in
* camera>. Even delete should keep that relation.
*/
@@ -687,7 +687,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
camera->functions->exit = camera_exit;
camera->functions->about = camera_about;
diff --git a/camlibs/sipix/xjpeg.c b/camlibs/sipix/xjpeg.c
index e20eeb3f5..86640504b 100644
--- a/camlibs/sipix/xjpeg.c
+++ b/camlibs/sipix/xjpeg.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -59,7 +59,7 @@ rd(int len, char *data) {
static int
getmarker(void) {
int c;
-
+
c = rb(0);
if (c == -1) return -1;
if (c!=0xff) return -1;
@@ -70,7 +70,7 @@ getmarker(void) {
static int
getlength(void) {
int x1,x2;
-
+
x1 = rb(1);
if (x1 == -1) return -1;
x2 = rb(1);
@@ -143,7 +143,7 @@ main(int argc, char **argv) {
m = getmarker();
if (m != SOI) {
- fprintf(stderr,":unknown, aborting.\n");
+ fprintf(stderr,":unknown, aborting.\n");
return 1;
}
fprintf(stderr,":SOI\n");
@@ -160,7 +160,7 @@ main(int argc, char **argv) {
switch (m) {
case COM: {
char *comment;
-
+
comment = malloc(len - 2 + 1);
comment[len-2]='\0';
if (-1 == rd(len - 2, comment))
diff --git a/camlibs/smal/smal.c b/camlibs/smal/smal.c
index 41a575fd7..b8bbe89da 100644
--- a/camlibs/smal/smal.c
+++ b/camlibs/smal/smal.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -45,7 +45,7 @@
#endif
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "smal");
return (GP_OK);
@@ -67,11 +67,11 @@ static const struct smal_cameras {
};
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
int i;
-
+
memset(&a, 0, sizeof(a));
a.status = GP_DRIVER_STATUS_EXPERIMENTAL; /* highly! */
a.port = GP_PORT_USB;
@@ -89,7 +89,7 @@ camera_abilities (CameraAbilitiesList *list)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
if (camera->pl) {
free(camera->pl);
@@ -106,7 +106,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
Camera *camera = user_data;
int size,image_no,result;
unsigned char *data;
-
+
image_no = gp_filesystem_number(fs, folder, filename, context);
if (image_no < GP_OK)
return image_no;
@@ -117,7 +117,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
gp_file_set_mime_type (file, GP_MIME_PPM);
break;
case GP_FILE_TYPE_RAW:
- result = ultrapocket_getrawpicture(camera, context,
+ result = ultrapocket_getrawpicture(camera, context,
&data, &size, filename);
gp_file_set_mime_type (file, GP_MIME_PPM);
break;
@@ -127,9 +127,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
if (result < 0)
return result;
-
+
CHECK_RESULT(gp_file_set_data_and_size (file, (char *)data, size));
-
+
return (GP_OK);
}
@@ -139,13 +139,13 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
{
Camera *camera = data;
int image_no;
-
+
image_no = gp_filesystem_number(fs, folder, filename, context);
if (image_no < GP_OK)
return image_no;
CHECK_RESULT(ultrapocket_deletefile(camera, filename));
-
+
return (GP_OK);
}
@@ -165,7 +165,7 @@ camera_about (Camera *camera, CameraText *about, GPContext *context)
strcpy (about->text, _("Smal Ultrapocket\n"
"Lee Benfield <lee@benf.org>\n"
"Driver for accessing the Smal Ultrapocket camera, and OEM versions (slimshot)"));
-
+
return (GP_OK);
}
@@ -175,11 +175,11 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
{
Camera *camera = data;
int count, result;
-
+
result = ultrapocket_getpicsoverview(camera, context, &count, list);
if (result != GP_OK)
return result;
-
+
return (GP_OK);
}
@@ -191,11 +191,11 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
CameraAbilities cab;
up_badge_type badge;
-
+
camera->functions->exit = camera_exit;
camera->functions->about = camera_about;
gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera);
@@ -206,8 +206,8 @@ camera_init (Camera *camera, GPContext *context)
case USB_VENDOR_ID_CREATIVE:
switch (cab.usb_product) {
case USB_DEVICE_ID_ULTRAPOCKET:
- /* could be an axia eyeplate or a slimshot
- * figure it out later, when we get the image
+ /* could be an axia eyeplate or a slimshot
+ * figure it out later, when we get the image
* catalogue.
*/
badge = BADGE_GENERIC;
@@ -234,12 +234,12 @@ camera_init (Camera *camera, GPContext *context)
default:
break;
}
-
+
if (badge == BADGE_UNKNOWN) {
/* can't happen. Otherwise, how'd we get to camera_init, neh? */
return GP_ERROR;
}
-
+
camera->pl = malloc (sizeof (CameraPrivateLibrary));
camera->pl->up_type = badge;
/* don't need to do any exciting init stuff until we get pic numbers */
diff --git a/camlibs/smal/smal.h b/camlibs/smal/smal.h
index 622b66d5e..46677dd88 100644
--- a/camlibs/smal/smal.h
+++ b/camlibs/smal/smal.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/smal/ultrapocket.c b/camlibs/smal/ultrapocket.c
index 2e0859db0..7f0addfaa 100644
--- a/camlibs/smal/ultrapocket.c
+++ b/camlibs/smal/ultrapocket.c
@@ -36,7 +36,7 @@
#include "smal.h"
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
-# define sleep(x)
+# define sleep(x)
#endif
#define GP_MODULE "Smal Ultrapocket"
@@ -210,7 +210,7 @@ getpicture_logitech_pd(Camera *camera, GPContext *context, unsigned char **rd, c
* use a different protocol - have to differetiate.
*/
int
-ultrapocket_getrawpicture(Camera *camera, GPContext *context,
+ultrapocket_getrawpicture(Camera *camera, GPContext *context,
unsigned char **pdata, int *size, const char *filename)
{
char ppmheader[200];
@@ -265,13 +265,13 @@ ultrapocket_getrawpicture(Camera *camera, GPContext *context,
/* and chop the spare 4 pixels off the RHS */
for (pc = 1; pc < height; pc++) {
- memmove(outdata + pmmhdr_len + ((long)width * pc * 3),
- outdata + pmmhdr_len + (((long)width + 4) * pc * 3),
+ memmove(outdata + pmmhdr_len + ((long)width * pc * 3),
+ outdata + pmmhdr_len + (((long)width + 4) * pc * 3),
((long)width) * 3);
}
/* modify outsize to reflect trim */
outsize = ((long)width) * height * 3 + pmmhdr_len;
-
+
free(rawdata);
if (result < 0) {
free (outdata);
@@ -329,7 +329,7 @@ ultrapocket_getpicture(Camera *camera, GPContext *context, unsigned char **pdata
", gamma %.2f"
#endif
"\n%d %d\n"
- "255\n", BayerTileNames[tile],
+ "255\n", BayerTileNames[tile],
#if DO_GAMMA
GAMMA_NUMBER,
#endif
@@ -354,8 +354,8 @@ ultrapocket_getpicture(Camera *camera, GPContext *context, unsigned char **pdata
/* and chop the spare 4 pixels off the RHS */
for (pc = 1; pc < height; pc++) {
- memmove(outdata + pmmhdr_len + ((long)width * pc * 3),
- outdata + pmmhdr_len + (((long)width + 4) * pc * 3),
+ memmove(outdata + pmmhdr_len + ((long)width * pc * 3),
+ outdata + pmmhdr_len + (((long)width + 4) * pc * 3),
((long)width) * 3);
}
/* modify outsize to reflect trim */
@@ -505,7 +505,7 @@ static int getpicsoverview_generic(
char fn[20];
int picid;
int reset_needed;
-
+
CHECK_RESULT(ultrapocket_sync(camera));
memset(command, 0, 16);
@@ -579,7 +579,7 @@ static int getpicsoverview_logitech_pd(
*
* Fuji Slimshot + Axia etc
* The camera responds with 8 * 0x1000 bytes
- *
+ *
* Creative CardCam
* The camera responds with 8 * 0x1000 bytes
*
diff --git a/camlibs/smal/ultrapocket.h b/camlibs/smal/ultrapocket.h
index b951daafd..5d193c7fe 100644
--- a/camlibs/smal/ultrapocket.h
+++ b/camlibs/smal/ultrapocket.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/sonix/library.c b/camlibs/sonix/library.c
index 444eb6a0a..7d7141f26 100644
--- a/camlibs/sonix/library.c
+++ b/camlibs/sonix/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -58,17 +58,17 @@ static const struct {
unsigned short idProduct;
} models[] = {
{"DC31VC", GP_DRIVER_STATUS_EXPERIMENTAL, 0x0c45, 0x8000},
- {"Wild Planet Digital Spy Camera 70137", GP_DRIVER_STATUS_EXPERIMENTAL,
+ {"Wild Planet Digital Spy Camera 70137", GP_DRIVER_STATUS_EXPERIMENTAL,
0x0c45, 0x8001},
- {"Sakar Digital Keychain 11199", GP_DRIVER_STATUS_EXPERIMENTAL,
+ {"Sakar Digital Keychain 11199", GP_DRIVER_STATUS_EXPERIMENTAL,
0x0c45, 0x8003},
- {"Sakar Digital no, 6637x", GP_DRIVER_STATUS_EXPERIMENTAL,
+ {"Sakar Digital no, 6637x", GP_DRIVER_STATUS_EXPERIMENTAL,
0x0c45, 0x8003},
- {"Sakar Digital no, 67480", GP_DRIVER_STATUS_EXPERIMENTAL,
+ {"Sakar Digital no, 67480", GP_DRIVER_STATUS_EXPERIMENTAL,
0x0c45, 0x8003},
{"Mini Shotz ms-350", GP_DRIVER_STATUS_EXPERIMENTAL, 0x0c45, 0x8008},
{"Vivitar Vivicam3350B", GP_DRIVER_STATUS_EXPERIMENTAL, 0x0c45, 0x800a},
- {"Genius Smart 300, version 2", GP_DRIVER_STATUS_EXPERIMENTAL,
+ {"Genius Smart 300, version 2", GP_DRIVER_STATUS_EXPERIMENTAL,
0x0458, 0x7005},
{NULL,0,0,0}
};
@@ -76,14 +76,14 @@ static const struct {
int
camera_id (CameraText *id)
{
- strcpy (id->text, "Vivitar ViviCam3350B");
+ strcpy (id->text, "Vivitar ViviCam3350B");
return GP_OK;
}
int
camera_abilities (CameraAbilitiesList *list)
{
- int i;
+ int i;
CameraAbilities a;
for (i = 0; models[i].name; i++) {
@@ -110,14 +110,14 @@ static int
camera_summary (Camera *camera, CameraText *summary, GPContext *context)
{
int ret = 0;
- if(!camera->pl->sonix_init_done)
+ if(!camera->pl->sonix_init_done)
ret = sonix_init(camera->port, camera->pl);
if ( ret != GP_OK) {
free(camera->pl);
camera->pl = NULL;
return ret;
}
- if (!camera->pl->num_pics)
+ if (!camera->pl->num_pics)
sonix_exit(camera->port);
sprintf (summary->text,ngettext(
"Sonix camera.\nThere is %i photo in it.\n",
@@ -127,9 +127,9 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
return GP_OK;
}
-static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
+static int camera_manual (Camera *camera, CameraText *manual, GPContext *context)
{
- strcpy(manual->text,
+ strcpy(manual->text,
_(
"This driver supports some cameras that use the Sonix sn9c2028 chip.\n"
"The following operations are supported:\n"
@@ -140,9 +140,9 @@ static int camera_manual (Camera *camera, CameraText *manual, GPContext *context
" - image capture to camera ( ditto )\n"
"If present on the camera, video clip frames are downloaded \n"
"as consecutive still photos or as AVI files, depending on the model.\n"
- "Thumbnails for AVIs are still photos made from the first frame.\n"
+ "Thumbnails for AVIs are still photos made from the first frame.\n"
"A single image cannot be deleted unless it is the last one.\n"
- ));
+ ));
return (GP_OK);
}
@@ -160,12 +160,12 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int i = 0;
char name[16];
int(avitype);
int ret = 0;
- if(!camera->pl->sonix_init_done)
+ if(!camera->pl->sonix_init_done)
ret = sonix_init(camera->port, camera->pl);
if ( ret != GP_OK) {
free(camera->pl);
@@ -181,7 +181,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
if (avitype) {
snprintf (name, 16, "sonix%03i.avi", i+1);
avitype = 0;
- } else
+ } else
snprintf (name, 16, "sonix%03i.ppm", i+1);
gp_list_append (list, name, NULL);
}
@@ -192,9 +192,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *user_data,
GPContext *context)
{
- Camera *camera = user_data;
+ Camera *camera = user_data;
int w, h = 0, buffersize = 0, i, k, rawsize = 0;
- unsigned char *data = NULL;
+ unsigned char *data = NULL;
unsigned char *ppm, *ptr, *avi=NULL, *frame_data = NULL;
unsigned char *p_data = NULL, *p_buf = NULL;
unsigned int numframes = 0;
@@ -209,7 +209,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
int ret = 0;
GP_DEBUG ("Downloading pictures!\n");
- if(!camera->pl->sonix_init_done)
+ if(!camera->pl->sonix_init_done)
ret = sonix_init(camera->port, camera->pl);
if ( ret != GP_OK) {
free(camera->pl);
@@ -223,13 +223,13 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CAM_OFFSET = camera->pl->offset;
POST_CODE = camera->pl->post;
/* Get the number of the photo on the camera */
- k = gp_filesystem_number (camera->fs, "/", filename, context);
+ k = gp_filesystem_number (camera->fs, "/", filename, context);
if (k < GP_OK) return k;
/* Cheap camera. No EXIF data. Quick! Kill this before it multiplies! */
- if(type == GP_FILE_TYPE_EXIF)
+ if(type == GP_FILE_TYPE_EXIF)
return GP_ERROR_FILE_EXISTS;
i = camera->pl->size_code[k];
- switch (i) {
+ switch (i) {
case 0: w=352; h = 288; break;
case 9: avitype = 1; /* multiframe */
case 1: w=176; h = 144; break;
@@ -237,7 +237,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
case 2: w=640; h = 480; break;
case 0x0b: avitype = 1; /* multiframe */
case 3: w=320; h = 240; break;
- default: GP_DEBUG ("Size code unknown\n");
+ default: GP_DEBUG ("Size code unknown\n");
return (GP_ERROR_NOT_SUPPORTED);
}
GP_DEBUG( "avitype is %d\n", avitype);
@@ -246,9 +246,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
if (rawsize < GP_OK)
return rawsize;
GP_DEBUG("rawsize = 0x%x = %i\n", rawsize, rawsize);
- if(rawsize%0x40)
+ if(rawsize%0x40)
buffersize = rawsize - (rawsize%0x40) + 0x40;
- else
+ else
buffersize = rawsize;
data = calloc (buffersize+64, 1);
if (!data) return GP_ERROR_NO_MEMORY;
@@ -256,7 +256,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
switch(type) {
case GP_FILE_TYPE_NORMAL:
- /* count end of frame markers to know the number of
+ /* count end of frame markers to know the number of
*frames and the size and starting offset of each */
endpoint = 0;
numframes = 0;
@@ -269,8 +269,8 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
(p_buf[endpoint-10]==0x00) &&
(p_buf[endpoint-9]==0xc4) &&
(p_buf[endpoint-8]==0xc4) ) &&
- (endpoint < buffersize +64
- - bytes_used))
+ (endpoint < buffersize +64
+ - bytes_used))
endpoint ++ ;
if ( !((p_buf[endpoint-12]==0xff) &&
(p_buf[endpoint-11]==0xff) &&
@@ -285,7 +285,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
p_buf[endpoint-5]);
compressed=p_buf[endpoint-5]&1;
}
- framestart[numframes+1] =
+ framestart[numframes+1] =
framestart[numframes] + endpoint;
p_buf += endpoint;
bytes_used += endpoint;
@@ -337,7 +337,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
return GP_ERROR_NO_MEMORY;
}
GP_DEBUG("avi hdr written\n");
- gp_file_append(file, (char *)avi,
+ gp_file_append(file, (char *)avi,
SAKAR_AVI_HEADER_LENGTH);
free(avi);
GP_DEBUG("avi hdr put away\n");
@@ -354,21 +354,21 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
offset = 0x40*(framestart[i]/0x40)+0x40;
if (offset == framestart[i] + 0x40)
offset -= 0x40;
- GP_DEBUG("framestart[%i] = 0x%x\n", i,
+ GP_DEBUG("framestart[%i] = 0x%x\n", i,
framestart[i]);
GP_DEBUG("offset = 0x%x\n", offset);
switch (POST_CODE) {
case DECOMP|REVERSE:
- sonix_decode (frame_data,
- data+offset+CAM_OFFSET, w, h);
+ sonix_decode (frame_data,
+ data+offset+CAM_OFFSET, w, h);
sonix_cols_reverse(frame_data, w, h);
gp_ahd_decode(frame_data, w, h, ptr+
SAKAR_AVI_FRAME_HEADER_LENGTH,
BAYER_TILE_GBRG);
break;
case DECOMP:
- sonix_decode (frame_data,
- data+offset+CAM_OFFSET, w, h);
+ sonix_decode (frame_data,
+ data+offset+CAM_OFFSET, w, h);
sonix_rows_reverse(frame_data, w, h);
gp_ahd_decode(frame_data, w, h, ptr+
SAKAR_AVI_FRAME_HEADER_LENGTH,
@@ -382,10 +382,10 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
SAKAR_AVI_FRAME_HEADER_LENGTH,
BAYER_TILE_GRBG);
}
- white_balance(ptr+SAKAR_AVI_FRAME_HEADER_LENGTH,
+ white_balance(ptr+SAKAR_AVI_FRAME_HEADER_LENGTH,
w * h, 1.2);
- gp_file_append(file, (char *)ptr,
- 3*frame_size+
+ gp_file_append(file, (char *)ptr,
+ 3*frame_size+
SAKAR_AVI_FRAME_HEADER_LENGTH);
GP_DEBUG("Done with frame number %i\n",i+1);
}
@@ -400,9 +400,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
camera->pl->sonix_init_done = 1;
sonix_exit(camera->port);
}
- /* For an AVI file, we make a PPM thumbnail of the
- * first frame. Otherwise, still photos are processed
- * here, and also the thumbnails for them.
+ /* For an AVI file, we make a PPM thumbnail of the
+ * first frame. Otherwise, still photos are processed
+ * here, and also the thumbnails for them.
*/
p_data = malloc (w * h);
if (!p_data) {free (data); return GP_ERROR_NO_MEMORY;}
@@ -443,7 +443,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
gp_file_set_data_and_size (file, (char *)ppm, size);
free (data);
return GP_OK;
- case GP_FILE_TYPE_RAW:
+ case GP_FILE_TYPE_RAW:
gp_file_set_mime_type(file, GP_MIME_RAW);
gp_file_append( file, (char *)data, rawsize);
free(data);
@@ -452,17 +452,17 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
default:
free(data);
return GP_ERROR_NOT_SUPPORTED;
- }
+ }
return GP_OK;
}
static int
-delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
- GPContext *context)
+delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
+ GPContext *context)
{
Camera *camera = data;
int ret = 0;
- if(!camera->pl->sonix_init_done)
+ if(!camera->pl->sonix_init_done)
ret = sonix_init(camera->port, camera->pl);
if ( ret != GP_OK) {
free(camera->pl);
@@ -480,7 +480,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
Camera *camera = data;
int k;
int ret = 0;
- if(!camera->pl->sonix_init_done)
+ if(!camera->pl->sonix_init_done)
ret = sonix_init(camera->port, camera->pl);
if ( ret != GP_OK) {
free(camera->pl);
@@ -506,7 +506,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
{
int ret = 0, n;
char name[30];
- if(!camera->pl->sonix_init_done)
+ if(!camera->pl->sonix_init_done)
ret = sonix_init(camera->port, camera->pl);
if ( ret != GP_OK) {
free(camera->pl);
@@ -558,7 +558,7 @@ camera_init(Camera *camera, GPContext *context)
int ret = 0;
ret = gp_camera_get_abilities(camera,&abilities);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
GP_DEBUG("product number is 0x%x\n", abilities.usb_product);
/* First, set up all the function pointers */
@@ -567,10 +567,10 @@ camera_init(Camera *camera, GPContext *context)
camera->functions->summary = camera_summary;
camera->functions->about = camera_about;
camera->functions->exit = camera_exit;
-
+
GP_DEBUG ("Initializing the camera\n");
ret = gp_port_get_settings(camera->port,&settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
switch (camera->port->type) {
case GP_PORT_SERIAL:
@@ -587,7 +587,7 @@ camera_init(Camera *camera, GPContext *context)
}
ret = gp_port_set_settings(camera->port,settings);
- if (ret < 0) return ret;
+ if (ret < 0) return ret;
GP_DEBUG("interface = %i\n", settings.usb.interface);
GP_DEBUG("inep = %x\n", settings.usb.inep);
@@ -606,9 +606,9 @@ camera_init(Camera *camera, GPContext *context)
camera->pl->post = 0;
GP_DEBUG("post code is 0x%x\n", camera->pl->post);
/* Connect to the camera only if something is actually being done,
- * because otherwise the Sakar Digital Keychain camera is put into
- * some kind of excited mode when gtkam is run, and will not leave
- * this mode even after gtkam is exited.
+ * because otherwise the Sakar Digital Keychain camera is put into
+ * some kind of excited mode when gtkam is run, and will not leave
+ * this mode even after gtkam is exited.
*/
return GP_OK;
}
diff --git a/camlibs/sonix/sonix.c b/camlibs/sonix/sonix.c
index 22b2d73f5..02f280cdf 100644
--- a/camlibs/sonix/sonix.c
+++ b/camlibs/sonix/sonix.c
@@ -10,10 +10,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -35,30 +35,30 @@
#include "sonix.h"
-#define GP_MODULE "sonix"
+#define GP_MODULE "sonix"
/* Three often-used generic commands */
/* This reads a one-byte "status" response */
static int
-SONIX_READ (GPPort *port, char *data)
+SONIX_READ (GPPort *port, char *data)
{
return gp_port_usb_msg_interface_read(port, 0, 1, 0, data, 1);
}
/* This reads a 4-byte response to a command */
static int
-SONIX_READ4 (GPPort *port, char *data)
+SONIX_READ4 (GPPort *port, char *data)
{
return gp_port_usb_msg_interface_read(port, 0, 4, 0, data, 4);
}
/* A command to the camera is a 6-byte string, and this sends it. */
static int
-SONIX_COMMAND (GPPort *port, char *command)
+SONIX_COMMAND (GPPort *port, char *command)
{
- return gp_port_usb_msg_interface_write(port, 8, 2, 0, command ,6);
+ return gp_port_usb_msg_interface_write(port, 8, 2, 0, command ,6);
}
@@ -76,14 +76,14 @@ int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
SONIX_READ(port, &status);
- if (status == 0x02) goto skip_a_step;
+ if (status == 0x02) goto skip_a_step;
/* If status is 2 we can skip several steps. Otherwise, status
- * needs to be reset to 0 and massaged until it is 2.
+ * needs to be reset to 0 and massaged until it is 2.
*/
-
+
if ((unsigned)status) {
i = 0;
-
+
while ((unsigned)status > 0) {
if (SONIX_READ(port, &status) < GP_OK)
break;
@@ -91,7 +91,7 @@ int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
if (i==1000) break;
}
}
-
+
SONIX_COMMAND ( port, c);
@@ -99,12 +99,12 @@ int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
if (SONIX_READ(port, &status) < GP_OK)
break;
}
-
+
/* FIXME(Marcus): was indented at above level, unclear if it is needed this way ... */
SONIX_READ(port, &status);
skip_a_step:
-
+
/*
* We are supposed to get c[0]=0x8c here; in general the reply
* string ought to start with the command byte c[0], plus 0x80
@@ -116,19 +116,19 @@ int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
memset (c, 0, 6);
while (!reading[1]&&!reading[2]&&!reading[3]) {
- c[0]=0x16;
+ c[0]=0x16;
if (SONIX_COMMAND ( port, c ) < GP_OK)
break;
/*
* For the Vivicam 3350b this always gives
- * 96 0a 76 07. This is apparently the firmware version.
- * The webcam-osx comments that the 0x0a gives the sensor
- * type, which is OV7630. For the Sakar Digital Keychain
- * 11199 the string is 96 03 31 08, instead. For the
- * Mini-Shotz ms350 it is 96 08 26 09. For the Genius
+ * 96 0a 76 07. This is apparently the firmware version.
+ * The webcam-osx comments that the 0x0a gives the sensor
+ * type, which is OV7630. For the Sakar Digital Keychain
+ * 11199 the string is 96 03 31 08, instead. For the
+ * Mini-Shotz ms350 it is 96 08 26 09. For the Genius
* Smart 300 it is 96 00 67 09 and for the Digital
* Spy Camera 70137 it is 96 01 31 09. Since the cameras
- * have different abilities, we ought to distinguish.
+ * have different abilities, we ought to distinguish.
*/
if (SONIX_READ4 (port, (char *)reading) < GP_OK)
break;
@@ -179,21 +179,21 @@ int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
}
/*
- * This sequence gives the photos in the camera and sets a flag
- * in reading[3] if the camera is full. Alas, clip frames are
- * not counted; the AVI constructor will need to count them
+ * This sequence gives the photos in the camera and sets a flag
+ * in reading[3] if the camera is full. Alas, clip frames are
+ * not counted; the AVI constructor will need to count them
*/
memset (c,0,6);
c[0]=0x18;
SONIX_READ(port, &status);
SONIX_COMMAND ( port, c );
SONIX_READ(port, &status);
- SONIX_READ4 (port, (char *)reading);
+ SONIX_READ4 (port, (char *)reading);
if (reading[0] != 0x98)
- return GP_ERROR_CAMERA_ERROR;
+ return GP_ERROR_CAMERA_ERROR;
GP_DEBUG ("number of photos is %d\n", reading[1]+ 256*reading[2]);
- /*
- * If reading[3] = 0x01, it means the camera is full of data.
+ /*
+ * If reading[3] = 0x01, it means the camera is full of data.
* The capture_image() function must then be disabled.
*/
if (!(reading[3])) priv->full = 0;
@@ -220,8 +220,8 @@ int sonix_init (GPPort *port, CameraPrivateLibrary *priv)
return GP_OK;
}
-int
-sonix_read_data_size (GPPort *port, int n)
+int
+sonix_read_data_size (GPPort *port, int n)
{
char status;
unsigned char c[6];
@@ -239,14 +239,14 @@ sonix_read_data_size (GPPort *port, int n)
return (reading[1] + reading[2]*0x100 + reading[3] *0x10000);
}
-int
-sonix_delete_all_pics (GPPort *port)
+int
+sonix_delete_all_pics (GPPort *port)
{
char status;
char c[6];
unsigned char reading[4];
memset (c,0,6);
- c[0]=0x05;
+ c[0]=0x05;
SONIX_READ(port, &status);
SONIX_COMMAND ( port, c );
SONIX_READ(port, &status);
@@ -256,8 +256,8 @@ sonix_delete_all_pics (GPPort *port)
return GP_OK;
}
-int
-sonix_delete_last (GPPort *port)
+int
+sonix_delete_last (GPPort *port)
{
char status;
char c[6];
@@ -273,7 +273,7 @@ sonix_delete_last (GPPort *port)
return GP_OK;
}
-int
+int
sonix_capture_image (GPPort *port)
{
char status;
@@ -281,7 +281,7 @@ sonix_capture_image (GPPort *port)
unsigned char reading[4];
GP_DEBUG("Running sonix_capture_image\n");
memset (c,0,6);
- c[0]=0x0e;
+ c[0]=0x0e;
SONIX_READ(port, &status);
SONIX_COMMAND ( port, c );
SONIX_READ(port, &status);
@@ -291,8 +291,8 @@ sonix_capture_image (GPPort *port)
return GP_OK;
}
-int
-sonix_exit (GPPort *port)
+int
+sonix_exit (GPPort *port)
{
char status;
char c[6];
@@ -305,7 +305,7 @@ sonix_exit (GPPort *port)
return GP_OK;
}
-/*
+/*
* The decoding algorithm originates with Bertrik Sikken. This version adapted
* from the webcam-osx (macam) project. See README for details.
*/
@@ -324,19 +324,19 @@ sonix_exit (GPPort *port)
}
/*
- * PEEK_BITS puts the next <num> bits into the low bits of <to>.
- * when the buffer is empty, it is completely refilled.
- * This strategy tries to reduce memory access. Note that the high bits
+ * PEEK_BITS puts the next <num> bits into the low bits of <to>.
+ * when the buffer is empty, it is completely refilled.
+ * This strategy tries to reduce memory access. Note that the high bits
* are NOT set to zero!
*/
#define EAT_BITS(num) { bitBufCount-=num; }
/*
- * EAT_BITS consumes <num> bits (PEEK_BITS does not consume anything,
+ * EAT_BITS consumes <num> bits (PEEK_BITS does not consume anything,
* it just peeks)
*/
-
+
#define PARSE_PIXEL(val) {\
PEEK_BITS(10,bits);\
if ((bits&0x200)==0) { \
@@ -388,13 +388,13 @@ sonix_exit (GPPort *port)
/* Now the decode function itself */
-int
-sonix_decode(unsigned char * dst, unsigned char * src, int width, int height)
+int
+sonix_decode(unsigned char * dst, unsigned char * src, int width, int height)
{
long dst_index = 0;
int starting_row = 0;
unsigned short bits;
- short c1val, c2val;
+ short c1val, c2val;
int x, y;
unsigned long bitBuf = 0;
unsigned long bitBufCount = 0;
@@ -416,7 +416,7 @@ sonix_decode(unsigned char * dst, unsigned char * src, int width, int height)
return GP_OK;
}
-int sonix_byte_reverse (unsigned char *imagedata, int datasize)
+int sonix_byte_reverse (unsigned char *imagedata, int datasize)
{
int i;
unsigned char temp;
@@ -428,28 +428,28 @@ int sonix_byte_reverse (unsigned char *imagedata, int datasize)
return GP_OK;
}
-int sonix_rows_reverse (unsigned char *imagedata, int width, int height)
+int sonix_rows_reverse (unsigned char *imagedata, int width, int height)
{
int col, row;
unsigned char temp;
for (col = 0; col < width; col++)
for (row=0; row< height /2 ; row++) {
temp = imagedata[row*width+col];
- imagedata[row*width+col] =
+ imagedata[row*width+col] =
imagedata[(height-row-1)*width +col];
- imagedata[(height-row-1)*width + col] = temp;
+ imagedata[(height-row-1)*width + col] = temp;
}
return GP_OK;
}
-int sonix_cols_reverse (unsigned char *imagedata, int width, int height)
+int sonix_cols_reverse (unsigned char *imagedata, int width, int height)
{
int col, row;
unsigned char temp;
for (row=0; row < height ; row++) {
for (col =0; col< width/2 ; col++) {
temp = imagedata[row*width + col];
- imagedata[row*width + col] =
+ imagedata[row*width + col] =
imagedata[row*width + width - 1 - col];
imagedata[row*width + width - 1 - col] = temp;
}
@@ -474,15 +474,15 @@ int sonix_cols_reverse (unsigned char *imagedata, int width, int height)
*/
static int
-histogram (unsigned char *data, unsigned int size, int *htable_r,
+histogram (unsigned char *data, unsigned int size, int *htable_r,
int *htable_g, int *htable_b)
{
int x;
/* Initializations */
- for (x = 0; x < 256; x++) {
- htable_r[x] = 0;
- htable_g[x] = 0;
- htable_b[x] = 0;
+ for (x = 0; x < 256; x++) {
+ htable_r[x] = 0;
+ htable_g[x] = 0;
+ htable_b[x] = 0;
}
/* Building the histograms */
for (x = 0; x < (size * 3); x += 3)
@@ -510,7 +510,7 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
x = 1;
for (r = 64; r < 192; r++)
{
- x += htable_r[r];
+ x += htable_r[r];
x += htable_g[r];
x += htable_b[r];
}
@@ -521,7 +521,7 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
new_gamma = .50;
MAX_FACTOR=1.2;
}
- else if (gamma < 0.60)
+ else if (gamma < 0.60)
new_gamma = 0.60;
else
new_gamma = gamma;
@@ -531,14 +531,14 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
gp_gamma_correct_single(gtable,data,size);
/* ---------------- BRIGHT DOTS ------------------- */
- max = size / 200;
+ max = size / 200;
histogram(data, size, htable_r, htable_g, htable_b);
- for (r=254, x=0; (r > 64) && (x < max); r--)
- x += htable_r[r];
- for (g=254, x=0; (g > 64) && (x < max); g--)
+ for (r=254, x=0; (r > 64) && (x < max); r--)
+ x += htable_r[r];
+ for (g=254, x=0; (g > 64) && (x < max); g--)
x += htable_g[g];
- for (b=254, x=0; (b > 64) && (x < max); b--)
+ for (b=254, x=0; (b > 64) && (x < max); b--)
x += htable_b[b];
r_factor = (double) 254 / r;
@@ -576,11 +576,11 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
histogram(data, size, htable_r, htable_g, htable_b);
- for (r=0, x=0; (r < 64) && (x < max); r++)
- x += htable_r[r];
- for (g=0, x=0; (g < 64) && (x < max); g++)
+ for (r=0, x=0; (r < 64) && (x < max); r++)
+ x += htable_r[r];
+ for (g=0, x=0; (g < 64) && (x < max); g++)
x += htable_g[g];
- for (b=0, x=0; (b < 64) && (x < max); b++)
+ for (b=0, x=0; (b < 64) && (x < max); b++)
x += htable_b[b];
r_factor = (double) 254 / (255-r);
@@ -611,15 +611,15 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
d = (int) (r + 2*g + b) / 4.;
if ( r > d )
r = r + (int) ((r - d) * (255-r)/(256-d) * saturation);
- else
+ else
r = r + (int) ((r - d) * (255-d)/(256-r) * saturation);
if (g > d)
g = g + (int) ((g - d) * (255-g)/(256-d) * saturation);
- else
+ else
g = g + (int) ((g - d) * (255-d)/(256-g) * saturation);
if (b > d)
b = b + (int) ((b - d) * (255-b)/(256-d) * saturation);
- else
+ else
b = b + (int) ((b - d) * (255-d)/(256-b) * saturation);
if (r < 0) { r = 0; }
@@ -633,6 +633,6 @@ white_balance (unsigned char *data, unsigned int size, float saturation)
data[x+2] = b;
}
-
+
return 0;
}
diff --git a/camlibs/sonix/sonix.h b/camlibs/sonix/sonix.h
index 64833fae8..b13981c0b 100644
--- a/camlibs/sonix/sonix.h
+++ b/camlibs/sonix/sonix.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -48,12 +48,12 @@ int sonix_delete_all_pics (GPPort *port);
int sonix_delete_last (GPPort *port);
int sonix_capture_image (GPPort *port);
int sonix_exit (GPPort *port);
-int sonix_decode (unsigned char * dst, unsigned char * src,
+int sonix_decode (unsigned char * dst, unsigned char * src,
int width, int height);
int sonix_byte_reverse (unsigned char *imagedata, int datasize);
int sonix_rows_reverse (unsigned char *imagedata, int width, int height);
int sonix_cols_reverse (unsigned char *imagedata, int width, int height);
int white_balance (unsigned char *data, unsigned int size, float saturation);
-#endif
+#endif
diff --git a/camlibs/sonydscf55/camera.c b/camlibs/sonydscf55/camera.c
index 9cc45fa89..c6eb364c9 100644
--- a/camlibs/sonydscf55/camera.c
+++ b/camlibs/sonydscf55/camera.c
@@ -283,7 +283,7 @@ get_camera_model(Camera *camera, SonyModel *model)
{
CameraAbilities a;
int rc;
-
+
rc = gp_camera_get_abilities (camera, &a);
if (rc == GP_OK) {
int i;
@@ -314,7 +314,7 @@ int
camera_init(Camera * camera, GPContext *context)
{
int rc;
- SonyModel model;
+ SonyModel model;
rc = get_camera_model(camera, &model);
if (rc != GP_OK)
diff --git a/camlibs/sonydscf55/sony.c b/camlibs/sonydscf55/sony.c
index f74ad234a..2a15aa201 100644
--- a/camlibs/sonydscf55/sony.c
+++ b/camlibs/sonydscf55/sony.c
@@ -478,7 +478,7 @@ sony_baud_set(Camera * camera, long baud)
if (camera->pl->current_baud_rate != baud) {
/* FIXME */
SetTransferRate[3] = sony_baud_to_id(baud);
-
+
rc = sony_converse(camera, &dp, SetTransferRate, 4);
if (rc == GP_OK) {
sony_baud_port_set(camera, baud);
@@ -700,7 +700,7 @@ sony_file_get(Camera * camera, int imageid, int file_type,
int sc; /* count of bytes to skip at start of packet */
Packet dp;
int rc;
- char buffer[128];
+ char buffer[128];
GP_DEBUG( "sony_file_get()");
@@ -708,7 +708,7 @@ sony_file_get(Camera * camera, int imageid, int file_type,
if (rc != GP_OK) {
return rc;
}
-
+
if (gp_context_cancel(context) == GP_CONTEXT_FEEDBACK_CANCEL) {
return GP_ERROR_CANCEL;
}
@@ -862,7 +862,7 @@ sony_image_info(Camera * camera, int imageid, SonyFileType file_type,
if (rc != GP_OK) {
return rc;
}
-
+
if (gp_context_cancel(context) == GP_CONTEXT_FEEDBACK_CANCEL) {
return GP_ERROR_CANCEL;
}
diff --git a/camlibs/soundvision/agfa_cl18.c b/camlibs/soundvision/agfa_cl18.c
index 5c1d5c623..d90adb6a4 100644
--- a/camlibs/soundvision/agfa_cl18.c
+++ b/camlibs/soundvision/agfa_cl18.c
@@ -6,10 +6,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -55,7 +55,7 @@ int agfa_capture(CameraPrivateLibrary *dev, CameraFilePath *path) {
if (ret < 0) return ret;
ret=soundvision_send_command(SOUNDVISION_SETPC2,0,dev);
if (ret < 0) return ret;
-
+
/*Not sure if this delay is necessary, but it was used in the windows driver*/
/*delay(20); */
sleep(20);
@@ -75,58 +75,58 @@ int agfa_capture(CameraPrivateLibrary *dev, CameraFilePath *path) {
/* thanks to heathhey3@hotmail.com for sending me the trace */
/* to implement this */
int agfa_delete_picture(CameraPrivateLibrary *dev, const char *filename) {
-
- int32_t ret,temp,taken;
+
+ int32_t ret,temp,taken;
uint8_t data[4],*buffer;
uint32_t size=4,buflen;
-
+
/* yes, we do this twice?? */
taken=soundvision_photos_taken(dev);
taken=soundvision_photos_taken(dev);
-
+
ret = soundvision_send_command(SOUNDVISION_GET_PIC_SIZE,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
/* Some traces show sending other than the file we want deleted? */
ret=soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, data, size);
+
+ ret = soundvision_read(dev, data, size);
if (ret<0) return ret;
-
+
/* Check num taken AGAIN */
taken=soundvision_photos_taken(dev);
-
+
ret = soundvision_send_command(SOUNDVISION_GET_PIC_SIZE,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, data, size);
+
+ ret = soundvision_read(dev, data, size);
if (ret<0) return ret;
-
+
/* Check num taken AGAIN */
taken=soundvision_photos_taken(dev);
-
+
ret=soundvision_send_command(SOUNDVISION_DELETE,0,dev);
if (ret<0) return ret;
-
+
/* read ff 0f ??? */
- ret = soundvision_read(dev, data, size);
+ ret = soundvision_read(dev, data, size);
if (ret<0) return ret;
-
+
ret = soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
+
/* This is the point we notices that in fact a pic is missing */
/* Why do it 4 times??? Timing?? Who knows */
taken=soundvision_photos_taken(dev);
@@ -136,11 +136,11 @@ int agfa_delete_picture(CameraPrivateLibrary *dev, const char *filename) {
if (taken > ((1<<31) / 13 ))
return GP_ERROR_NO_MEMORY;
-
+
buflen = (taken * 13)+1; /* 12 char filenames and space for each */
/* plus trailing NULL */
buffer = malloc(buflen);
-
+
if (!buffer) {
GP_DEBUG("Could not allocate %i bytes!",
buflen);
@@ -161,20 +161,20 @@ int agfa_delete_picture(CameraPrivateLibrary *dev, const char *filename) {
if (dev->file_list) free(dev->file_list);
dev->file_list = (char *)buffer;
-
+
ret=soundvision_send_command(SOUNDVISION_GET_PIC_SIZE,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, data, size);
- if (ret<0) return ret;
-
+
+ ret = soundvision_read(dev, data, size);
+ if (ret<0) return ret;
+
return GP_OK;
}
@@ -186,22 +186,22 @@ int agfa_get_file_list(CameraPrivateLibrary *dev) {
char *buffer;
int32_t ret, taken, buflen,i;
-
+
/* It seems we need to do a "reset" packet before reading names?? */
-
+
soundvision_reset(dev,NULL,NULL);
-
+
if ( (taken=soundvision_photos_taken(dev)) < 0)
return taken;
-
+
dev->num_pictures = taken;
-
+
buflen = (taken * 13)+1; /* 12 char filenames and space for each */
/* plus trailing NULL */
-
+
buffer = malloc(buflen);
-
+
if (!buffer) {
GP_DEBUG("Could not allocate %i bytes!",
buflen);
@@ -233,7 +233,7 @@ int agfa_get_file_list(CameraPrivateLibrary *dev) {
free(buffer);
return (GP_ERROR_NO_MEMORY);
}
-
+
for(i=0;i<taken*13;i++) if (buffer[i]==' ') buffer[i]='\0';
memcpy(dev->file_list, buffer, taken * 13);
free(buffer);
@@ -241,26 +241,26 @@ int agfa_get_file_list(CameraPrivateLibrary *dev) {
#if 0
taken=soundvision_photos_taken(dev);
soundvision_get_thumb_size(dev,dev->file_list);
-#endif
+#endif
return GP_OK;
}
int agfa_get_pic(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size) {
-
- int32_t ret,temp;
-
+
+ int32_t ret,temp;
+
ret = soundvision_send_command(SOUNDVISION_GET_PIC,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, data, size);
+
+ ret = soundvision_read(dev, data, size);
if (ret<0) return ret;
#if 0
@@ -268,84 +268,84 @@ int agfa_get_pic(CameraPrivateLibrary *dev, const char *filename,
ret=soundvision_send_command(SOUNDVISION_DONE_PIC,0,dev);
if (ret<0) return ret;
#endif
-
+
return GP_OK;
-
+
}
int agfa_get_pic_size(CameraPrivateLibrary *dev, const char *filename) {
-
+
int32_t ret,temp;
- uint32_t size;
-
+ uint32_t size;
+
ret=soundvision_send_command(SOUNDVISION_GET_PIC_SIZE,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, &size, sizeof(size));
+
+ ret = soundvision_read(dev, &size, sizeof(size));
if (ret<0) return ret;
-
+
return le32toh(size);
-
+
}
int agfa_get_thumb_size(CameraPrivateLibrary *dev, const char *filename) {
-
+
int32_t ret,temp;
- uint32_t size;
-
+ uint32_t size;
+
ret=soundvision_send_command(SOUNDVISION_GET_THUMB_SIZE,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
ret = soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, &size, sizeof(size));
+
+ ret = soundvision_read(dev, &size, sizeof(size));
if (ret<0) return ret;
-
+
return le32toh(size);
-
+
}
int agfa_get_thumb(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size) {
- int32_t ret,temp;
-
+ int32_t ret,temp;
+
ret = soundvision_send_command(SOUNDVISION_GET_THUMB,0,dev);
if (ret<0) return ret;
-
+
/* always returns ff 0f 00 00 ??? */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) return ret;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, data, size);
+
+ ret = soundvision_read(dev, data, size);
if (ret<0) return ret;
#if 0
/* Is this needed? */
soundvision_photos_taken(dev,&ret);
-
+
ret=soundvision_send_command(SOUNDVISION_END_OF_THUMB,0,dev);
if (ret<0) return ret;
-
- ret = soundvision_read(dev, temp_string, 8);
- if (ret<0) return ret;
-#endif
-
+
+ ret = soundvision_read(dev, temp_string, 8);
+ if (ret<0) return ret;
+#endif
+
return GP_OK;
-
+
}
diff --git a/camlibs/soundvision/commands.c b/camlibs/soundvision/commands.c
index 7a809bed2..d249e2f87 100644
--- a/camlibs/soundvision/commands.c
+++ b/camlibs/soundvision/commands.c
@@ -6,10 +6,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -42,23 +42,23 @@
#define GP_MODULE "soundvision"
/* Regular commands always 8 bytes long */
-int32_t soundvision_send_command(uint32_t command, uint32_t argument,
+int32_t soundvision_send_command(uint32_t command, uint32_t argument,
CameraPrivateLibrary *dev) {
uint8_t cmd[12];
int result;
-
+
htole32a(&cmd[0],8); /* Length "8" in little-endian 32bits */
htole32a(&cmd[4],command); /* Command is a little-endian 32bits */
htole32a(&cmd[8],argument); /* Argument is a little-endian 32bits */
-
+
result=gp_port_write(dev->gpdev,(char *)&cmd,sizeof(cmd));
if (result<0) return result;
return GP_OK;
}
/* Filenames are always 12 bytes long */
-int32_t soundvision_send_file_command(const char *filename,
+int32_t soundvision_send_file_command(const char *filename,
CameraPrivateLibrary *dev) {
char file_cmd[16];
@@ -76,18 +76,18 @@ int32_t soundvision_read(CameraPrivateLibrary *dev, void *buffer, int len) {
/* Reset the camera */
int soundvision_reset(CameraPrivateLibrary *dev,char *revision, char *status) {
-
+
int ret,attempts=0;
-
-retry_reset:
-
+
+retry_reset:
+
/* This prevents lockups on tiger !!!! */
ret=soundvision_send_command(SOUNDVISION_START_TRANSACTION,0,dev);
if (ret<0) goto reset_error;
-
+
/* First get firmware revision */
ret=soundvision_get_revision(dev,revision);
-
+
/* If camera out of whack, this is where it will hang */
/* If we retry a few times usually after a few timeouts */
/* It will get going again */
@@ -98,65 +98,65 @@ retry_reset:
}
else goto reset_error;
}
-
+
/* Dshot 3 camera does 2 extra steps */
/* Seems to enable extra info in status */
/* What does it do? It works w/o it */
/* And other tiger cameras might not */
/* need it. */
-#if 0
+#if 0
if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS) {
- char result[12];
-
+ char result[12];
+
/* What does 0x405 signify? */
ret=soundvision_send_command(SOUNDVISION_SETPC2,0x405,dev);
if (ret<0) goto reset_error;
-
+
ret=soundvision_send_command(SOUNDVISION_INIT2,0,dev);
if (ret<0) goto reset_error;
-
+
/* Read returned value. Why 0x140,0xf,0x5 ? */
ret = soundvision_read(dev, &result, sizeof(result));
- if (ret<0) goto reset_error;
+ if (ret<0) goto reset_error;
}
#endif
-
+
/* Read the status registers */
dev->reset_times++;
-
+
if (dev->device_type!=SOUNDVISION_IXLA) {
ret=soundvision_get_status(dev,status);
if (ret<0) goto reset_error;
}
-
+
return GP_OK;
-
+
reset_error:
-
+
GP_DEBUG("Error in soundvision_reset\n");
return ret;
-
+
}
int soundvision_get_revision(CameraPrivateLibrary *dev, char *revision) {
-
+
int ret;
char version[9];
-
+
ret = soundvision_send_command(SOUNDVISION_GET_VERSION,0,dev);
if (ret<0) return ret;
-
+
ret = soundvision_read(dev, &version, sizeof(version)-1);
if (ret<0) return ret;
-
+
/* If null we don't care */
if (revision!=NULL) {
strncpy(revision,version,8);
revision[8]=0;
}
-
+
return GP_OK;
}
@@ -174,21 +174,21 @@ int soundvision_get_status(CameraPrivateLibrary *dev, char *status) {
ret = soundvision_read(dev, (unsigned char *)&ss, sizeof(ss));
if (ret < 0) goto get_status_error;
-
+
if (status!=NULL) {
memcpy(status,ss,0x60);
}
-
+
return GP_OK;
-
+
get_status_error:
GP_DEBUG("Error getting camera status\n");
return ret;
-
+
}
int soundvision_photos_taken(CameraPrivateLibrary *dev) {
-
+
int32_t ret;
uint32_t numpics;
@@ -197,9 +197,9 @@ int soundvision_photos_taken(CameraPrivateLibrary *dev) {
ret = soundvision_read(dev, &numpics, sizeof(numpics));
if (ret < 0) goto error_photos_taken;
-
+
return le32toh(numpics);
-
+
error_photos_taken:
GP_DEBUG("Error getting number of photos taken.\n");
return ret;
@@ -213,7 +213,7 @@ int soundvision_get_file_list(CameraPrivateLibrary *dev) {
}
int soundvision_get_thumb_size(CameraPrivateLibrary *dev, const char *filename) {
- if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
+ if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
return tiger_get_thumb_size(dev,filename);
else
return agfa_get_thumb_size(dev,filename);
@@ -221,14 +221,14 @@ int soundvision_get_thumb_size(CameraPrivateLibrary *dev, const char *filename)
int soundvision_get_thumb(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size) {
- if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
+ if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
return tiger_get_thumb(dev,filename,data,size);
else
return agfa_get_thumb(dev,filename,data,size);
}
int soundvision_get_pic_size(CameraPrivateLibrary *dev, const char *filename) {
- if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
+ if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
return tiger_get_pic_size(dev,filename);
else
return agfa_get_pic_size(dev,filename);
@@ -236,14 +236,14 @@ int soundvision_get_pic_size(CameraPrivateLibrary *dev, const char *filename) {
int soundvision_get_pic(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size) {
- if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
+ if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
return tiger_get_pic(dev,filename,data,size);
else
return agfa_get_pic(dev,filename,data,size);
}
int soundvision_delete_picture(CameraPrivateLibrary *dev, const char *filename) {
- if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
+ if (dev->device_type==SOUNDVISION_TIGERFASTFLICKS)
return tiger_delete_picture(dev,filename);
else
return agfa_delete_picture(dev,filename);
diff --git a/camlibs/soundvision/commands.h b/camlibs/soundvision/commands.h
index d79dbd0f0..49d6bf9ca 100644
--- a/camlibs/soundvision/commands.h
+++ b/camlibs/soundvision/commands.h
@@ -5,10 +5,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -18,14 +18,14 @@
#ifndef commands_H
#define commands_H
-
+
int32_t soundvision_send_command(uint32_t command, uint32_t argument,
CameraPrivateLibrary *dev);
int32_t soundvision_send_file_command(const char *filename,
CameraPrivateLibrary *dev);
-
+
int32_t soundvision_read(CameraPrivateLibrary *dev, void *buffer, int len);
#endif
diff --git a/camlibs/soundvision/soundvision.c b/camlibs/soundvision/soundvision.c
index 577ff4908..0b3c19ab7 100644
--- a/camlibs/soundvision/soundvision.c
+++ b/camlibs/soundvision/soundvision.c
@@ -6,10 +6,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -20,10 +20,10 @@
* For cameras using the Clarity2 chip made by Soundvision Inc.
* Made entirely w/o Soundvision's help. They would not give
* documentation. Reverse-engineered from usb-traces.
- *
+ *
* Copyright 2002-2003 Vince Weaver <vince@deater.net>
- *
- * Originally based on the digita driver
+ *
+ * Originally based on the digita driver
* Copyright 1999-2000 Johannes Erdfelt, VA Linux Systems
*/
@@ -67,14 +67,14 @@ static const struct {
char serial;
} models[] = {
{"Agfa:ePhoto CL18",0x06bd,0x0403,0},
-
+
{"Mustek:gSmart 350",0x055f,0xa350,0},
-
+
{"RCA:CDS1005",0x0784,0x0100,0},
{"Ixla:DualCam 640",0x0784,0x0100,0},
{"Pretec:dc530",0x0784,0x5300,0},
-
+
{"Generic SoundVision:Clarity2",0x0919,0x100,0},
{"Argus:DC-2200",0x0919,0x100,0},
{"CoolCam:CP086",0x0919,0x100,0},
@@ -85,34 +85,34 @@ static const struct {
{"Oregon Scientific:DShot III",0x0919,0x0100,0},
{"Scott:APX 30",0x0919,0x0100,0},
{"StarCam:CP086",0x0919,0x100,0},
- {"Tiger:Fast Flicks",0x0919,0x0100,0},
+ {"Tiger:Fast Flicks",0x0919,0x0100,0},
{NULL,0,0,0}
};
int camera_id(CameraText *id) {
-
+
strcpy(id->text, "soundvision");
-
+
return GP_OK;
}
int camera_abilities(CameraAbilitiesList *list) {
-
+
int i;
CameraAbilities a;
for(i=0; models[i].name; i++) {
memset(&a, 0, sizeof(a));
strcpy(a.model, models[i].name);
-
+
/* Agfa and Dshot types owned by author and tested */
/* Others the testing not quite certain */
if ( (models[i].idVendor==0x06bd) || (models[i].idVendor==0x0919))
a.status = GP_DRIVER_STATUS_PRODUCTION;
else
a.status = GP_DRIVER_STATUS_EXPERIMENTAL;
-
+
/* For now all are USB. Have the spec for Serial */
/* If ever one shows up */
a.port = GP_PORT_USB;
@@ -125,13 +125,13 @@ int camera_abilities(CameraAbilitiesList *list) {
/* Folders not supported on any */
a.folder_operations = GP_FOLDER_OPERATION_NONE;
-
- a.file_operations = GP_FILE_OPERATION_PREVIEW |
+
+ a.file_operations = GP_FILE_OPERATION_PREVIEW |
GP_FILE_OPERATION_DELETE;
/* Dshot compat can upload files */
if (models[i].idVendor == 0x0919) {
- a.file_operations|=GP_FOLDER_OPERATION_PUT_FILE;
- }
+ a.file_operations|=GP_FOLDER_OPERATION_PUT_FILE;
+ }
gp_abilities_list_append(list, a);
@@ -145,25 +145,25 @@ static int camera_exit (Camera *camera, GPContext *context) {
camera->pl->reset_times,
camera->pl->num_pictures,
camera->pl->odd_command);
-
+
/* We _must_ reset an even number of times ?? */
/* It's more complicated than that. *sigh* */
if (camera->pl->reset_times==1) {
soundvision_reset (camera->pl,NULL,NULL);
-#if 0
+#if 0
/* Odd number of pics */
- if (camera->pl->num_pictures%2==1) {
- if (!camera->pl->odd_command)
+ if (camera->pl->num_pictures%2==1) {
+ if (!camera->pl->odd_command)
soundvision_reset (camera->pl,NULL,NULL);
}
else {
- if (camera->pl->odd_command)
+ if (camera->pl->odd_command)
soundvision_reset (camera->pl,NULL,NULL);
}
-#endif
+#endif
}
-
-
+
+
if (camera->pl) {
if (camera->pl->file_list) {
free(camera->pl->file_list);
@@ -176,20 +176,20 @@ static int camera_exit (Camera *camera, GPContext *context) {
return GP_OK;
}
-static int file_list_func (CameraFilesystem *fs, const char *folder,
+static int file_list_func (CameraFilesystem *fs, const char *folder,
CameraList *list, void *data, GPContext *context) {
-
+
Camera *camera=data;
int i;
char temp_file[14];
GP_DEBUG ("camera_file_list %s\n", folder);
-
+
if (soundvision_get_file_list(camera->pl) < 0) {
GP_DEBUG ("Could not soundvision_file_list!");
return GP_ERROR;
}
-
+
for(i=0; i < camera->pl->num_pictures; i++) {
strncpy(temp_file,camera->pl->file_list+(13*i),12);
temp_file[12]=0;
@@ -199,11 +199,11 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
}
-static int soundvision_file_get (Camera *camera, const char *filename, int thumbnail,
+static int soundvision_file_get (Camera *camera, const char *filename, int thumbnail,
unsigned char **data, int *size) {
int buflen,throwaway,result;
-
+
if (thumbnail) GP_DEBUG( "Getting thumbnail '%s'...",filename);
else GP_DEBUG( "Getting file '%s'...",filename);
@@ -214,37 +214,37 @@ static int soundvision_file_get (Camera *camera, const char *filename, int thumb
if (buflen < 0) return buflen;
} else {
soundvision_reset(camera->pl,NULL,NULL);
-
+
/* Always have to check num photos,
* then pic size no matter what. Otherwise
- * the camera will stop responding
+ * the camera will stop responding
*/
throwaway=soundvision_photos_taken(camera->pl);
if (throwaway<0) {
result=throwaway;
goto file_get_error;
}
-
-
+
+
/* The below two lines might look wrong, but they aren't! */
buflen = soundvision_get_pic_size(camera->pl,filename);
if (thumbnail) buflen=soundvision_get_thumb_size(camera->pl,filename);
if (buflen < 0) return buflen;
}
-
-
-
+
+
+
/* Don't try to download if size equals zero! */
if (buflen) {
-
+
*data = malloc(buflen+1);
-
+
if (!*data) {
result=GP_ERROR_NO_MEMORY;
goto file_get_error;
}
-
+
memset(*data, 0, buflen);
if (thumbnail) {
@@ -252,20 +252,20 @@ static int soundvision_file_get (Camera *camera, const char *filename, int thumb
if (result < 0) {
GP_DEBUG("soundvision_get_thumb_failed!");
goto file_get_error;
- }
+ }
}
- else {
+ else {
result=soundvision_get_pic(camera->pl, filename, *data, buflen);
if (result < 0) {
GP_DEBUG("soundvision_get_pic_failed!");
goto file_get_error;
- }
+ }
}
-
+
if (size)
- *size = buflen;
+ *size = buflen;
}
-
+
return GP_OK;
file_get_error:
@@ -274,12 +274,12 @@ file_get_error:
return result;
}
-static int get_file_func (CameraFilesystem *fs, const char *folder,
+static int get_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, CameraFileType type,
CameraFile *file, void *user_data,
GPContext *context) {
char *pos;
-
+
Camera *camera = user_data;
unsigned char *data = NULL;
int size,ret;
@@ -296,15 +296,15 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
default:
return GP_ERROR_NOT_SUPPORTED;
}
-
+
if (!data) return GP_ERROR;
gp_file_set_data_and_size (file, (char *)data, size);
/* Maybe skip below if EXIF data present? */
-
+
/* As far as I know we only support JPG and MOV */
/* Maybe some have MP3??? */
- pos=strchr (filename, '.');
+ pos=strchr (filename, '.');
if (pos) {
if ((!strcmp(pos,".JPG")) || ((!strcmp(pos,".jpg"))))
gp_file_set_mime_type (file, GP_MIME_JPEG);
@@ -313,7 +313,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
else
gp_file_set_mime_type (file, GP_MIME_UNKNOWN);
}
-
+
return GP_OK;
}
@@ -321,17 +321,17 @@ static int camera_summary(Camera *camera, CameraText *summary,
GPContext *context) {
char revision[9];
-
+
revision[0]=0;
soundvision_reset(camera->pl,revision,NULL);
-
+
if (camera->pl->device_type==SOUNDVISION_TIGERFASTFLICKS) {
int mem_total,mem_free,num_pics, ret;
ret = tiger_get_mem(camera->pl,&num_pics,&mem_total,&mem_free);
if (ret < GP_OK)
return ret;
-
+
sprintf(summary->text, _("Firmware Revision: %8s\n"
"Pictures: %i\n"
"Memory Total: %ikB\n"
@@ -344,7 +344,7 @@ static int camera_summary(Camera *camera, CameraText *summary,
}
static int camera_about(Camera *camera, CameraText *about, GPContext *context) {
-
+
strcpy(about->text, _("Soundvision Driver\nVince Weaver <vince@deater.net>\n"));
return GP_OK;
@@ -354,25 +354,25 @@ static int camera_about(Camera *camera, CameraText *about, GPContext *context) {
/* Below contributed by Ben Hague <benhague@btinternet.com> */
static int camera_capture (Camera *camera, CameraCaptureType type,
CameraFilePath *path, GPContext *context) {
-
+
int result;
-
- if (camera->pl->device_type==SOUNDVISION_AGFACL18)
+
+ if (camera->pl->device_type==SOUNDVISION_AGFACL18)
result=agfa_capture(camera->pl,path);
- else if (camera->pl->device_type==SOUNDVISION_TIGERFASTFLICKS) {
+ else if (camera->pl->device_type==SOUNDVISION_TIGERFASTFLICKS) {
result=tiger_capture(camera->pl,path);
}
else return GP_ERROR_NOT_SUPPORTED;
if (result < GP_OK)
return result;
-
+
soundvision_get_file_list(camera->pl);
-
+
/* For some reason last taken picture is first on tiger? */
/* Might be last on Agfa. Who knows. Craziness. */
if (camera->pl->num_pictures<1) return GP_ERROR;
-
+
strcpy (path->name,camera->pl->file_list);
strcpy (path->folder, "/");
/* gp_filesystem_append (camera->fs, path->folder,
@@ -384,34 +384,34 @@ static int camera_capture (Camera *camera, CameraCaptureType type,
static int delete_file_func (CameraFilesystem *fs, const char *folder,
const char *filename, void *data,
GPContext *context) {
-
+
Camera *camera = data;
- GP_DEBUG("Deleting '%s' in '%s'...",filename,folder);
-
+ GP_DEBUG("Deleting '%s' in '%s'...",filename,folder);
+
soundvision_delete_picture(camera->pl,filename);
-
+
/* Update our file list */
if (soundvision_get_file_list(camera->pl)<0) return GP_ERROR;
-
+
return GP_OK;
}
static int put_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *data, GPContext *context) {
-
+
Camera *camera=data;
const char *data_file;
long unsigned int data_size;
-
+
/*
* Upload the file to the camera. Use gp_file_get_data_and_size, etc.
*/
GP_DEBUG ("*** put_file_func");
GP_DEBUG ("*** folder: %s", folder);
GP_DEBUG ("*** filename: %s", filename);
-
+
gp_file_get_data_and_size (file, &data_file, &data_size);
if ( data_size == 0) {
gp_context_error (context,
@@ -420,16 +420,16 @@ static int put_file_func (CameraFilesystem *fs, const char *folder, const char *
}
/* Should check memory here */
-
+
/* if (available_memory < data_size) {
gp_context_error (context,
_("Not enough memory available on the memory card"));
return GP_ERROR_NO_MEMORY;
}
*/
-
+
tiger_upload_file (camera->pl, filename,data_file,data_size);
-
+
return GP_OK;
}
@@ -441,7 +441,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int camera_init(Camera *camera, GPContext *context) {
-
+
GPPortSettings settings;
CameraAbilities a;
int ret = 0;
@@ -451,56 +451,56 @@ int camera_init(Camera *camera, GPContext *context) {
camera->functions->summary = camera_summary;
camera->functions->about = camera_about;
camera->functions->capture = camera_capture;
-
+
GP_DEBUG ("Initializing the camera\n");
switch (camera->port->type) {
case GP_PORT_USB:
ret=gp_port_get_settings(camera->port,&settings);
if (ret<0) return ret;
-
+
/* Use the defaults the core parsed */
ret=gp_port_set_settings(camera->port,settings);
- if (ret<0) return ret;
+ if (ret<0) return ret;
break;
-
+
case GP_PORT_SERIAL:
return GP_ERROR_IO_SUPPORTED_SERIAL;
- default:
+ default:
return GP_ERROR_NOT_SUPPORTED;
}
-
-
+
+
/* Set up camera private library */
camera->pl = malloc (sizeof (CameraPrivateLibrary));
if (!camera->pl) return (GP_ERROR_NO_MEMORY);
memset (camera->pl, 0, sizeof (CameraPrivateLibrary));
camera->pl->gpdev = camera->port;
-
+
/* Set up the sub-architectures */
/* Default to Agfa. Should we default otherwise? */
camera->pl->device_type=SOUNDVISION_AGFACL18;
gp_camera_get_abilities (camera, &a);
-
+
if ((a.usb_vendor==0x0919) && (a.usb_product==0x0100)) {
- camera->pl->device_type=SOUNDVISION_TIGERFASTFLICKS;
+ camera->pl->device_type=SOUNDVISION_TIGERFASTFLICKS;
}
-
+
if ((a.usb_vendor==0x0784) && (a.usb_product==0x0100)) {
camera->pl->device_type=SOUNDVISION_IXLA;
}
-
-
-
-
+
+
+
+
/* Keep track. We _must_ reset an even number of times */
camera->pl->reset_times=0;
camera->pl->odd_command=0;
-
+
/* Reset the camera */
ret = soundvision_reset (camera->pl,NULL,NULL);
if (ret < 0) {
diff --git a/camlibs/soundvision/soundvision.h b/camlibs/soundvision/soundvision.h
index a0d4580e3..17230abce 100644
--- a/camlibs/soundvision/soundvision.h
+++ b/camlibs/soundvision/soundvision.h
@@ -4,10 +4,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -21,7 +21,7 @@
#define SOUNDVISION_START_TRANSACTION 0x0001
-#define SOUNDVISION_SETPC2 0x0004
+#define SOUNDVISION_SETPC2 0x0004
#define SOUNDVISION_GET_MEM_TOTAL 0x0065
@@ -80,10 +80,10 @@ int soundvision_get_file_list(CameraPrivateLibrary *dev);
int soundvision_delete_picture(CameraPrivateLibrary *dev, const char *filename);
int soundvision_get_thumb_size(CameraPrivateLibrary *dev, const char *filename);
-int soundvision_get_thumb(CameraPrivateLibrary *dev, const char *filename,
+int soundvision_get_thumb(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size);
int soundvision_get_pic_size(CameraPrivateLibrary *dev, const char *filename);
-int soundvision_get_pic(CameraPrivateLibrary *dev, const char *filename,
+int soundvision_get_pic(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size);
/* agfa_cl18.c */
@@ -96,26 +96,26 @@ int agfa_get_pic(CameraPrivateLibrary *dev, const char *filename,
int agfa_get_pic_size(CameraPrivateLibrary *dev, const char *filename);
int agfa_get_thumb(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size);
-int agfa_get_thumb_size(CameraPrivateLibrary *dev, const char *filename);
-
-
-
-
-
+int agfa_get_thumb_size(CameraPrivateLibrary *dev, const char *filename);
+
+
+
+
+
/* tiger_fastflicks.c */
int tiger_set_pc_mode(CameraPrivateLibrary *dev);
int tiger_upload_file(CameraPrivateLibrary *dev, const char *filename,
const char *data, long data_size);
-int tiger_delete_picture(CameraPrivateLibrary *dev, const char *filename);
-int tiger_capture(CameraPrivateLibrary *dev, CameraFilePath *path);
-int tiger_get_mem(CameraPrivateLibrary *dev, int *num_pics, int *mem_total, int *mem_free);
+int tiger_delete_picture(CameraPrivateLibrary *dev, const char *filename);
+int tiger_capture(CameraPrivateLibrary *dev, CameraFilePath *path);
+int tiger_get_mem(CameraPrivateLibrary *dev, int *num_pics, int *mem_total, int *mem_free);
int tiger_get_file_list(CameraPrivateLibrary *dev);
int tiger_get_pic(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size);
int tiger_get_pic_size(CameraPrivateLibrary *dev, const char *filename);
int tiger_get_thumb(CameraPrivateLibrary *dev, const char *filename,
- unsigned char *data,int size);
-int tiger_get_thumb_size(CameraPrivateLibrary *dev, const char *filename);
+ unsigned char *data,int size);
+int tiger_get_thumb_size(CameraPrivateLibrary *dev, const char *filename);
#endif
diff --git a/camlibs/soundvision/tiger_fastflicks.c b/camlibs/soundvision/tiger_fastflicks.c
index 9b28452fc..b06744df9 100644
--- a/camlibs/soundvision/tiger_fastflicks.c
+++ b/camlibs/soundvision/tiger_fastflicks.c
@@ -6,10 +6,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -19,16 +19,16 @@
*
* Commands specific to soundvision camears with usbid
* 0x0919:0x0100 and possibly others.
- *
+ *
* Tiger FastFlicks was first camera of this type
* to be supported.
- *
- * Initial Support added by Dr. William Bland <wjb@abstractnonsense.com>
+ *
+ * Initial Support added by Dr. William Bland <wjb@abstractnonsense.com>
* Other help from Adrien Hernot <amh@BSD-DK.dk>
- *
+ *
* Vince Weaver got such a camera in Jan 2003 and massively
* re-wrote things.
- *
+ *
* Copyright 2002-2003 Vince Weaver <vince@deater.net>
*/
@@ -58,42 +58,42 @@
/* Used at start of most tiger commands. Also */
/* Seems to set the camera into "PC" mode */
int tiger_set_pc_mode(CameraPrivateLibrary *dev) {
-
+
int result;
GP_DEBUG("tiger_set_pc_mode");
-
+
result=soundvision_send_command(SOUNDVISION_START_TRANSACTION,0,dev);
if (result<0) goto set_pc_error;
-
+
result=soundvision_get_revision(dev,NULL);
if (result<0) goto set_pc_error;
-
+
result=soundvision_send_command(SOUNDVISION_SETPC1,0,dev);
if (result<0) goto set_pc_error;
-
+
result=soundvision_send_command(SOUNDVISION_SETPC2,0,dev);
if (result<0) goto set_pc_error;
-
+
return GP_OK;
-
-set_pc_error:
+
+set_pc_error:
return result;
}
-
-
+
+
/* This is packet-for-packet what windows does */
/* The camera takes it all in stride. */
/* Yet uploaded file never appears. Why?? */
-int tiger_upload_file(CameraPrivateLibrary *dev,
+int tiger_upload_file(CameraPrivateLibrary *dev,
const char *filename,
const char *data,
long size) {
int result=0;
char return_value[4];
-
+
uint32_t our_size;
char *our_data=NULL;
@@ -104,95 +104,95 @@ int tiger_upload_file(CameraPrivateLibrary *dev,
if (our_data==NULL) {
goto upload_error;
}
-
+
htole32a(&our_data[0],size);
memcpy(our_data+4,data,size);
-
-
+
+
GP_DEBUG("File: %s Size=%ld\n",filename,size);
/* for(result=0;result<our_size;result++) {
printf("%x ",our_data[result]);
}
-*/
+*/
result=tiger_set_pc_mode(dev);
if (result<0) goto upload_error;
-
+
result=soundvision_get_revision(dev,NULL);
if (result<0) goto upload_error;
-
+
result=soundvision_send_command(SOUNDVISION_GET_MEM_FREE,0,dev);
if (result<0) goto upload_error;
-
- result=soundvision_read(dev, &return_value, sizeof(return_value));
+
+ result=soundvision_read(dev, &return_value, sizeof(return_value));
if (result<0) goto upload_error;
-
+
result=soundvision_send_command(SOUNDVISION_PUT_FILE,size,dev);
if (result<0) goto upload_error;
-
- result=soundvision_read(dev, &return_value, sizeof(return_value));
+
+ result=soundvision_read(dev, &return_value, sizeof(return_value));
if (result<0) goto upload_error;
-
+
result=gp_port_write(dev->gpdev,our_data,our_size);
if (result<0) goto upload_error;
-
+
free(our_data);
our_data=NULL;
-#if 0
+#if 0
/* Some traces show the following, though most likely */
/* this is just the windows driver updating the file list */
-
+
result=soundvision_photos_taken(dev);
result=soundvision_get_file_list(dev);
-
+
result=soundvision_send_command(SOUNDVISION_GET_PIC_SIZE,0,dev);
if (result<0) goto upload_error;
-
- result=soundvision_read(dev, &return_value, sizeof(return_value));
+
+ result=soundvision_read(dev, &return_value, sizeof(return_value));
if (result<0) goto upload_error;
-
+
result=soundvision_send_file_command("000VINCE.JPG",dev);
-
- result=soundvision_read(dev, &return_value, sizeof(return_value));
+
+ result=soundvision_read(dev, &return_value, sizeof(return_value));
if (result<0) goto upload_error;
-
+
result=soundvision_send_command(SOUNDVISION_DONE_TRANSACTION,0,dev);
if (result<0) goto upload_error;
-#endif
+#endif
return GP_OK;
-
-upload_error:
+
+upload_error:
if (our_data!=NULL) free(our_data);
GP_DEBUG("Error in tiger_upload_file");
return result;
}
int tiger_delete_picture(CameraPrivateLibrary *dev, const char *filename) {
-
- int32_t ret,temp;
-
+
+ int32_t ret,temp;
+
ret = tiger_set_pc_mode(dev);
if (ret<0) goto delete_pic_error;
-
+
ret = soundvision_send_command(SOUNDVISION_DELETE,0,dev);
if (ret<0) goto delete_pic_error;
-
+
/* should get fff if all is well */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) goto delete_pic_error;
ret=soundvision_send_file_command(filename,dev);
if (ret<0) goto delete_pic_error;
-
+
ret = soundvision_send_command(SOUNDVISION_DONE_TRANSACTION,0,dev);
if (ret<0) goto delete_pic_error;
return GP_OK;
-delete_pic_error:
+delete_pic_error:
return ret;
-
+
}
int tiger_get_mem(CameraPrivateLibrary *dev, int *num_pics, int *mem_total, int *mem_free) {
@@ -202,79 +202,79 @@ int tiger_get_mem(CameraPrivateLibrary *dev, int *num_pics, int *mem_total, int
*num_pics=soundvision_photos_taken(dev);
if (*num_pics<0) goto get_mem_error;
-
+
result=soundvision_get_revision(dev,NULL);
if (result<0) goto get_mem_error;
result=soundvision_send_command(SOUNDVISION_GET_MEM_TOTAL,0,dev);
if (result<0) goto get_mem_error;
-
- result=soundvision_read(dev, &temp_result, sizeof(temp_result));
+
+ result=soundvision_read(dev, &temp_result, sizeof(temp_result));
if (result<0) goto get_mem_error;
-
+
*mem_total=le32toh(temp_result);
-
+
result=soundvision_send_command(SOUNDVISION_GET_MEM_FREE,0,dev);
if (result<0) goto get_mem_error;
-
- result=soundvision_read(dev, &temp_result, sizeof(temp_result));
+
+ result=soundvision_read(dev, &temp_result, sizeof(temp_result));
if (result<0) goto get_mem_error;
-
- *mem_free=le32toh(temp_result);
-
+
+ *mem_free=le32toh(temp_result);
+
return GP_OK;
-
+
get_mem_error:
GP_DEBUG("Error in tiger_get_mem");
return result;
}
-
+
int tiger_capture(CameraPrivateLibrary *dev, CameraFilePath *path) {
-
+
int result=0,start_pics,num_pics,mem_total,mem_free;
-
+
result=soundvision_send_command(SOUNDVISION_START_TRANSACTION,0,dev);
if (result<0) goto tiger_capture_error;
-
+
result=soundvision_get_revision(dev,NULL);
if (result<0) goto tiger_capture_error;
-
+
result=tiger_get_mem(dev,&start_pics,&mem_total,&mem_free);
if (result<0) goto tiger_capture_error;
-
+
result=soundvision_send_command(SOUNDVISION_SETPC2,0,dev);
if (result<0) goto tiger_capture_error;
-
+
result=soundvision_send_command(SOUNDVISION_TAKEPIC3,0,dev);
if (result<0) goto tiger_capture_error;
result=soundvision_send_command(SOUNDVISION_SETPC1,0,dev);
if (result<0) goto tiger_capture_error;
-
+
result=tiger_get_mem(dev,&num_pics,&mem_total,&mem_free);
if (result<0) goto tiger_capture_error;
-
+
while(num_pics==start_pics) {
sleep(4);
result=tiger_get_mem(dev,&num_pics,&mem_total,&mem_free);
if (result<0) goto tiger_capture_error;
}
-
+
result=tiger_get_mem(dev,&num_pics,&mem_total,&mem_free);
if (result<0) goto tiger_capture_error;
-
+
return GP_OK;
-
+
tiger_capture_error:
GP_DEBUG("ERROR with tiger_capture");
return result;
-
+
}
-
+
int tiger_get_file_list(CameraPrivateLibrary *dev) {
char *buffer=NULL;
@@ -282,32 +282,32 @@ int tiger_get_file_list(CameraPrivateLibrary *dev) {
ret=tiger_set_pc_mode(dev);
if (ret<0) goto list_files_error;
-
+
if ( (taken=soundvision_photos_taken(dev)) < 0) {
ret=taken;
goto list_files_error;
}
-
+
dev->num_pictures = taken;
if (taken>0) {
-
+
buflen = (taken * 13)+1; /* 12 char filenames and space for each */
/* plus trailing NULL */
-
+
buffer = malloc(buflen);
-
+
if (!buffer) {
GP_DEBUG("Could not allocate %i bytes!",buflen);
ret=GP_ERROR_NO_MEMORY;
goto list_files_error;
}
-
+
ret=soundvision_send_command(SOUNDVISION_GET_NAMES, buflen, dev);
if (ret < 0) {
goto list_files_error;
}
-
+
ret = soundvision_read(dev, (void *)buffer, buflen);
if (ret < 0) {
@@ -318,12 +318,12 @@ int tiger_get_file_list(CameraPrivateLibrary *dev) {
ret=GP_ERROR_NO_MEMORY;
goto list_files_error;
}
-
-
+
+
if (dev->file_list) free(dev->file_list);
dev->file_list = malloc(taken * 13);
-
+
if (!dev->file_list) {
GP_DEBUG("Could not allocate %i bytes!",taken*13);
ret=GP_ERROR_NO_MEMORY;
@@ -334,143 +334,143 @@ int tiger_get_file_list(CameraPrivateLibrary *dev) {
memcpy(dev->file_list, buffer, taken * 13);
free(buffer);
buffer=NULL;
-
-
+
+
}
-
-
- ret=soundvision_send_command(SOUNDVISION_DONE_TRANSACTION, 0, dev);
- if (ret<0) goto list_files_error;
+
+
+ ret=soundvision_send_command(SOUNDVISION_DONE_TRANSACTION, 0, dev);
+ if (ret<0) goto list_files_error;
/* If we have >1 pics we should stat a file?*/
/* Some traces do, some don't... */
/* if (taken>0)
soundvision_get_pic_size(dev,dev->file_list);
*/
-
+
return GP_OK;
-
+
list_files_error:
-
+
if (buffer!=NULL) free(buffer);
return ret;
}
int tiger_get_pic(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size) {
-
- int32_t ret,temp;
+
+ int32_t ret,temp;
GP_DEBUG("tiger_get_pic");
-
+
dev->odd_command=1;
-
+
ret=soundvision_get_revision(dev,NULL);
-
+
ret = soundvision_send_command(SOUNDVISION_GET_PIC,0,dev);
if (ret<0) goto get_pic_error;
-
- ret = soundvision_read(dev, &temp, sizeof(temp));
+
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) goto get_pic_error;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) goto get_pic_error;
-
- ret = soundvision_read(dev, data, size);
+
+ ret = soundvision_read(dev, data, size);
if (ret<0) goto get_pic_error;
ret=soundvision_send_command(SOUNDVISION_DONE_TRANSACTION,0,dev);
if (ret<0) goto get_pic_error;
-
+
return GP_OK;
get_pic_error:
return ret;
-
-
+
+
}
int tiger_get_pic_size(CameraPrivateLibrary *dev, const char *filename) {
-
+
int32_t ret,temp;
- uint32_t size;
+ uint32_t size;
GP_DEBUG("tiger_get_pic_size");
-
+
ret=soundvision_send_command(SOUNDVISION_GET_PIC_SIZE,0,dev);
if (ret<0) goto pic_size_error;
/* should check that we get 0x0fff */
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) goto pic_size_error;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) goto pic_size_error;
-
- ret = soundvision_read(dev, &size, sizeof(size));
+
+ ret = soundvision_read(dev, &size, sizeof(size));
if (ret<0) goto pic_size_error;
-
+
return le32toh(size);
-
+
pic_size_error:
return ret;
-
+
}
int tiger_get_thumb_size(CameraPrivateLibrary *dev, const char *filename) {
-
+
int32_t ret,temp;
- uint32_t size;
+ uint32_t size;
+
-
GP_DEBUG("tiger_get_thumb_size");
-
+
ret=soundvision_send_command(SOUNDVISION_GET_THUMB_SIZE,0,dev);
if (ret<0) goto thumb_size_error;
- ret = soundvision_read(dev, &temp, sizeof(temp));
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) goto thumb_size_error;
-
+
ret = soundvision_send_file_command(filename,dev);
if (ret<0) goto thumb_size_error;
-
- ret = soundvision_read(dev, &size, sizeof(size));
+
+ ret = soundvision_read(dev, &size, sizeof(size));
if (ret<0) goto thumb_size_error;
-
+
return le32toh(size);
thumb_size_error:
- return ret;
+ return ret;
}
int tiger_get_thumb(CameraPrivateLibrary *dev, const char *filename,
unsigned char *data,int size) {
- int32_t ret,temp;
-
+ int32_t ret,temp;
+
ret=soundvision_get_revision(dev,NULL);
-
+
ret = soundvision_send_command(SOUNDVISION_GET_THUMB,0,dev);
if (ret<0) goto get_thumb_error;
-
- ret = soundvision_read(dev, &temp, sizeof(temp));
+
+ ret = soundvision_read(dev, &temp, sizeof(temp));
if (ret<0) goto get_thumb_error;
-
+
ret=soundvision_send_file_command(filename,dev);
if (ret<0) goto get_thumb_error;
-
- ret = soundvision_read(dev, data, size);
+
+ ret = soundvision_read(dev, data, size);
if (ret<0) goto get_thumb_error;
ret=soundvision_send_command(SOUNDVISION_DONE_TRANSACTION,0,dev);
if (ret<0) goto get_thumb_error;
-
+
return GP_OK;
-
+
get_thumb_error:
return ret;
-
+
}
diff --git a/camlibs/spca50x/library.c b/camlibs/spca50x/library.c
index f9ee29fb0..5043bc906 100644
--- a/camlibs/spca50x/library.c
+++ b/camlibs/spca50x/library.c
@@ -124,7 +124,7 @@ models[] =
{"D-Link:DSC 350+", 0x084d, 0x0003,
BRIDGE_SPCA500, SPCA50X_FLASH},
{"Minton:S-Cam F5", 0x084d, 0x0003,
- BRIDGE_SPCA500, SPCA50X_FLASH},
+ BRIDGE_SPCA500, SPCA50X_FLASH},
{"PureDigital:Ritz Disposable", 0x04fc, 0xffff,
BRIDGE_SPCA504B_PD, SPCA50X_FLASH},
{NULL, 0, 0, 0, 0}
@@ -612,7 +612,7 @@ camera_init (Camera *camera, GPContext *context)
if (camera->pl->fw_rev > 1) {
CHECK (spca50x_detect_storage_type (camera->pl));
}
-
+
if (cam_has_flash(camera->pl) || cam_has_card(camera->pl) ) {
if ((camera->pl->bridge == BRIDGE_SPCA504) ||
(camera->pl->bridge == BRIDGE_SPCA504B_PD))
diff --git a/camlibs/spca50x/spca50x-flash.c b/camlibs/spca50x/spca50x-flash.c
index 1fe33b900..18be920c7 100644
--- a/camlibs/spca50x/spca50x-flash.c
+++ b/camlibs/spca50x/spca50x-flash.c
@@ -324,7 +324,7 @@ spca500_flash_capture (CameraPrivateLibrary *pl)
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
sleep(3);
#endif
-
+
/* invalidate TOC/info cache */
pl->dirty_flash = 1;
return GP_OK;
diff --git a/camlibs/spca50x/spca50x.c b/camlibs/spca50x/spca50x.c
index 2b6774d64..748d9b318 100644
--- a/camlibs/spca50x/spca50x.c
+++ b/camlibs/spca50x/spca50x.c
@@ -78,7 +78,7 @@ spca50x_detect_storage_type (CameraPrivateLibrary *lib)
for (i=0;i<3;i++)
{
buf[i] = 0; /* if no data returned, assume no capability */
- CHECK (gp_port_usb_msg_read (lib->gpdev, 0x28, 0x0000,
+ CHECK (gp_port_usb_msg_read (lib->gpdev, 0x28, 0x0000,
i, (char *)&buf[i], 0x01));
}
diff --git a/camlibs/sq905/library.c b/camlibs/sq905/library.c
index b03625838..f1193968e 100644
--- a/camlibs/sq905/library.c
+++ b/camlibs/sq905/library.c
@@ -186,7 +186,7 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int i,n;
GP_DEBUG ("List files in %s\n", folder);
if (0==strcmp(folder, "/")) {
@@ -260,8 +260,8 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
return GP_ERROR_NOT_SUPPORTED;
}
-
-
+
+
/* Get the entry number of the photo on the camera */
entry = -1;
if (0==strcmp(folder, "/")) {
@@ -271,7 +271,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
while (sq_is_clip(camera->pl, entry)
&& entry<camera->pl->nb_entries);
i--;
- }
+ }
while (i>0);
if (entry == camera->pl->nb_entries)
return GP_ERROR_FILE_NOT_FOUND;
@@ -280,7 +280,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
} else {
i = atoi(folder+1+4);
do {
- do entry++;
+ do entry++;
while (!sq_is_clip(camera->pl, entry) &&
entry<camera->pl->nb_entries);
i--;
@@ -306,7 +306,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
GP_DEBUG ("last entry was %d\n", camera->pl->last_fetched_entry);
/* Change register to DATA, but only if necessary */
- if ((camera->pl->last_fetched_entry == -1)
+ if ((camera->pl->last_fetched_entry == -1)
|| ((is_in_clip) && (frame == 0)) )
sq_access_reg(camera->port, DATA);
@@ -345,13 +345,13 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
return GP_ERROR_NO_MEMORY;
}
GP_DEBUG("Fetch entry %i\n", to_fetch);
- sq_read_picture_data
+ sq_read_picture_data
(camera->port, camera->pl->last_fetched_data, b);
camera->pl->last_fetched_entry = to_fetch;
} while (camera->pl->last_fetched_entry<entry);
frame_data = camera->pl->last_fetched_data+(w*h)*frame/comp_ratio;
- /* sq_preprocess ( ) turns the photo right-side-up and for some
+ /* sq_preprocess ( ) turns the photo right-side-up and for some
* models must also de-mirror the photo
*/
@@ -361,9 +361,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
sq_preprocess(camera->pl->model, comp_ratio,
is_in_clip, frame_data, w, h);
}
-
+
/*
- * Now put the data into a PPM image file.
+ * Now put the data into a PPM image file.
*/
ppm = malloc (w * h * 3 + 256); /* room for data + header */
if (!ppm) { return GP_ERROR_NO_MEMORY; }
@@ -394,7 +394,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
sq_decompress (camera->pl->model, rawdata,
frame_data, w, h);
- gp_gamma_fill_table (gtable, .65);
+ gp_gamma_fill_table (gtable, .65);
} else {
rawdata = frame_data;
gp_gamma_fill_table (gtable, .55);
@@ -478,7 +478,7 @@ camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
break;
}
- /* TO DO:
+ /* TO DO:
* Adapt some postprocessing routine to work here, because results
* can vary greatly, depending both on lighting conditions and on
* camera model.
@@ -539,7 +539,7 @@ camera_init(Camera *camera, GPContext *context)
ret = gp_port_get_settings(camera->port,&settings);
if (ret < 0) return ret;
-
+
ret = gp_port_set_settings(camera->port,settings);
if (ret < 0) return ret;
diff --git a/camlibs/sq905/postprocess.c b/camlibs/sq905/postprocess.c
index 3b7fe4745..177deca17 100644
--- a/camlibs/sq905/postprocess.c
+++ b/camlibs/sq905/postprocess.c
@@ -1,18 +1,18 @@
/*
* postprocess.c
*
- * Here are the decompression function for the compressed photos and the
- * postprocessing for uncompressed photos.
+ * Here are the decompression function for the compressed photos and the
+ * postprocessing for uncompressed photos.
*
* Copyright (c) 2003 Theodore Kilgore <kilgota@auburn.edu>
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
- * The chip supported by this driver is presumed to be the SQ905,
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
+ * The chip supported by this driver is presumed to be the SQ905,
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
#include <config.h>
@@ -31,7 +31,7 @@
#include <gphoto2/gphoto2-port.h>
#include "sq905.h"
-#define GP_MODULE "sq905"
+#define GP_MODULE "sq905"
#define RED 0
#define GREEN 1
@@ -45,8 +45,8 @@
#endif
-static int
-decode_panel (unsigned char *panel_out, unsigned char *panel,
+static int
+decode_panel (unsigned char *panel_out, unsigned char *panel,
int panelwidth, int height, int color);
int
@@ -54,11 +54,11 @@ sq_decompress (SQModel model, unsigned char *output, unsigned char *data,
int w, int h)
{
/*
- * Data arranged in planar form. We decompress the raw data first,
- * one colorplane at a time, and put the results into a standard
+ * Data arranged in planar form. We decompress the raw data first,
+ * one colorplane at a time, and put the results into a standard
* Bayer pattern. The byte-reversal routine having been done already,
- * the planes are in the order RBG. The R and B planes each have
- * dimensions (w/4)*(h/2), and the G is (w/4)*h.
+ * the planes are in the order RBG. The R and B planes each have
+ * dimensions (w/4)*(h/2), and the G is (w/4)*h.
*/
unsigned char *red, *green, *blue, *red_out, *green_out, *blue_out;
@@ -84,33 +84,33 @@ sq_decompress (SQModel model, unsigned char *output, unsigned char *data,
return -1;
}
decode_panel (red_out, red, w/2, h/2, RED);
- decode_panel (blue_out, blue, w/2, h/2, BLUE);
+ decode_panel (blue_out, blue, w/2, h/2, BLUE);
decode_panel (green_out, green, w/2, h, GREEN);
/* Now, put things in their proper places */
-
+
for ( m = 0; m < h/2 ; m++ ) {
for ( i = 0; i < w/2; i++ ) {
/* Reds in even rows, even columns */
output[(2*m)*w+2*i ] = red_out[m*w/2+i ];
/* Blues in odd rows, odd columns */
output[(2*m+1)*w+2*i +1] = blue_out[m*w/2+i];
- /* For the greens (note m*w = (2*m)*w/2) we
+ /* For the greens (note m*w = (2*m)*w/2) we
* get first the even rows, odd columns */
output[(2*m)*w+ 2*i+1] = green_out[m*w +i];
/* and then, the greens on odd rows, even columns. */
output[(2*m+1)*w+ 2*i] = green_out[(2*m+1)*w/2 +i];
}
}
-
+
/* De-mirroring for some models */
switch(model) {
case(SQ_MODEL_MAGPIX):
case(SQ_MODEL_POCK_CAM):
- for (i = 0; i < h; i++) {
+ for (i = 0; i < h; i++) {
for (m = 0 ; m < w/2; m++) {
temp = output[w*i +m];
output[w*i + m] = output[w*i + w -1 -m];
@@ -129,7 +129,7 @@ sq_decompress (SQModel model, unsigned char *output, unsigned char *data,
static
int decode_panel (unsigned char *panel_out, unsigned char *panel,
int panelwidth, int height, int color) {
- /* Here, "panelwidth" signifies width of panel_out
+ /* Here, "panelwidth" signifies width of panel_out
* which is w/2, and height equals h */
int diff = 0;
@@ -142,7 +142,7 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
int delta_table[] = {-144,-110,-77,-53,-35,-21,-11,-3,
2,10,20,34,52,76,110,144};
- unsigned char *temp_line;
+ unsigned char *temp_line;
temp_line = malloc(panelwidth);
if (!temp_line)
@@ -162,9 +162,9 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
input_counter ++;
/* left pixel */
diff = delta_table[delta_left];
- if (!i)
+ if (!i)
tempval = (temp_line[2*i]) + diff;
- else
+ else
tempval = (temp_line[2*i]
+ panel_out[m*panelwidth+2*i-1])/2 + diff;
tempval = MIN(tempval, 0xff);
@@ -192,9 +192,9 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
input_counter ++;
/* left pixel */
diff = delta_table[delta_left];
- if (!i)
+ if (!i)
tempval = (temp_line[0]+temp_line[1])/2 + diff;
- else
+ else
tempval = (temp_line[2*i+1]
+ panel_out[2*m*panelwidth+2*i-1])/2 + diff;
tempval = MIN(tempval, 0xff);
@@ -203,15 +203,15 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
temp_line[2*i] = tempval;
/* right pixel */
diff = delta_table[delta_right];
- if (2*i == panelwidth - 2 )
+ if (2*i == panelwidth - 2 )
tempval = (temp_line[2*i+1]
+ panel_out
- [2*m*panelwidth+2*i])/2
+ [2*m*panelwidth+2*i])/2
+ diff;
else
tempval = (temp_line[2*i+2]
+ panel_out
- [2*m*panelwidth+2*i])/2
+ [2*m*panelwidth+2*i])/2
+ diff;
tempval = MIN(tempval, 0xff);
tempval = MAX(tempval, 0);
@@ -225,12 +225,12 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
input_counter ++;
/* left pixel */
diff = delta_table[delta_left];
- if (!i)
+ if (!i)
tempval = (temp_line[2*i]) + diff;
- else
+ else
tempval = (temp_line[2*i]
+ panel_out
- [(2*m+1)*panelwidth+2*i-1])/2
+ [(2*m+1)*panelwidth+2*i-1])/2
+ diff;
tempval = MIN(tempval, 0xff);
tempval = MAX(tempval, 0);
@@ -239,7 +239,7 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
/* right pixel */
diff = delta_table[delta_right];
tempval = (temp_line[2*i+1]
- + panel_out[(2*m+1)*panelwidth+2*i])/2
+ + panel_out[(2*m+1)*panelwidth+2*i])/2
+ diff;
tempval = MIN(tempval, 0xff);
tempval = MAX(tempval, 0);
@@ -249,7 +249,7 @@ int decode_panel (unsigned char *panel_out, unsigned char *panel,
}
free (temp_line);
return GP_OK;
- }
+ }
}
diff --git a/camlibs/sq905/sq905.c b/camlibs/sq905/sq905.c
index 9d1aac7d1..548871034 100644
--- a/camlibs/sq905/sq905.c
+++ b/camlibs/sq905/sq905.c
@@ -1,17 +1,17 @@
/*
* sq905.c
*
- * Here, the functions which are needed to get data from the camera.
+ * Here, the functions which are needed to get data from the camera.
*
* Copyright (c) 2003 Theodore Kilgore <kilgota@auburn.edu>
- * Camera library support under libgphoto2.1.1 for camera(s)
- * with chipset from Service & Quality Technologies, Taiwan.
- * The chip supported by this driver is presumed to be the SQ905,
+ * Camera library support under libgphoto2.1.1 for camera(s)
+ * with chipset from Service & Quality Technologies, Taiwan.
+ * The chip supported by this driver is presumed to be the SQ905,
*
* Licensed under GNU Lesser General Public License, as part of Gphoto
- * camera support project. For a copy of the license, see the file
+ * camera support project. For a copy of the license, see the file
* COPYING in the main source tree of libgphoto2.
- */
+ */
#include <config.h>
@@ -30,7 +30,7 @@
#include <gphoto2/gphoto2-port.h>
#include "sq905.h"
-#define GP_MODULE "sq905"
+#define GP_MODULE "sq905"
#define SQWRITE gp_port_usb_msg_write
#define SQREAD gp_port_usb_msg_read
@@ -40,13 +40,13 @@
static int
sq_read_data (GPPort *port, unsigned char *data, int size)
{
- SQWRITE (port, 0x0c, 0x03, size, zero, 1);
- gp_port_read (port, (char *)data, size);
+ SQWRITE (port, 0x0c, 0x03, size, zero, 1);
+ gp_port_read (port, (char *)data, size);
return GP_OK;
}
-int sq_access_reg (GPPort *port, int reg)
+int sq_access_reg (GPPort *port, int reg)
{
char c;
SQWRITE (port, 0x0c, 0x06, reg, zero, 1); /* Access a register */
@@ -54,7 +54,7 @@ int sq_access_reg (GPPort *port, int reg)
return GP_OK;
}
-int
+int
sq_init (GPPort *port, CameraPrivateLibrary *priv)
{
unsigned char c[0x4];
@@ -115,7 +115,7 @@ int
sq_get_num_frames (CameraPrivateLibrary *priv, int entry)
{
if (sq_is_clip(priv, entry)) {
- GP_DEBUG(" Number of frames in clip %i is %i\n", entry, priv->catalog[16*entry+7]);
+ GP_DEBUG(" Number of frames in clip %i is %i\n", entry, priv->catalog[16*entry+7]);
return priv->catalog[16*entry+7];
} else {
return 1;
@@ -136,7 +136,7 @@ sq_get_comp_ratio (CameraPrivateLibrary *priv, int entry)
case 0x43:
case 0x52:
case 0x53:
- case 0x56:
+ case 0x56:
case 0x72: return 1;
default:
GP_DEBUG ("Your camera has unknown resolution settings.\n");
@@ -147,7 +147,7 @@ sq_get_comp_ratio (CameraPrivateLibrary *priv, int entry)
int
sq_get_picture_width (CameraPrivateLibrary *priv, int entry)
{
- switch (priv->catalog[16*entry]) {
+ switch (priv->catalog[16*entry]) {
case 0x41:
case 0x52:
case 0x61: return 352;
@@ -168,7 +168,7 @@ sq_get_picture_width (CameraPrivateLibrary *priv, int entry)
int
sq_is_clip (CameraPrivateLibrary *priv, int entry)
{
- switch (priv->catalog[16*entry]) {
+ switch (priv->catalog[16*entry]) {
case 0x52:
case 0x53:
case 0x72: return 1;
@@ -180,8 +180,8 @@ int
sq_rewind (GPPort *port, CameraPrivateLibrary *priv)
{
static unsigned char dummy_buf[0x4000];
-
-
+
+
GP_DEBUG("REWIND cam's data pointer");
/* One has to read the catalog to rewind the data stream...
@@ -222,17 +222,17 @@ sq_read_picture_data (GPPort *port, unsigned char *data, int size )
}
sq_read_data (port, data + offset, remainder);
- SQWRITE (port, 0x0c, 0xc0, 0x00, &c, 1);
+ SQWRITE (port, 0x0c, 0xc0, 0x00, &c, 1);
return GP_OK;
-}
+}
int
sq_delete_all (GPPort *port, CameraPrivateLibrary *priv)
{
- /* This will work on the Argus DC-1510, perhaps some others.
+ /* This will work on the Argus DC-1510, perhaps some others.
* Will not successfully delete on all SQ905 cameras!
- */
-
+ */
+
switch (priv->catalog[2]) {
case 0xd0: /* Searches for DC-1510 */
sq_access_reg(port, CAPTURE); /* used here to delete */
@@ -240,13 +240,13 @@ sq_delete_all (GPPort *port, CameraPrivateLibrary *priv)
sq_reset(port);
break;
default:
- return (GP_ERROR_NOT_SUPPORTED);
+ return (GP_ERROR_NOT_SUPPORTED);
}
return GP_OK;
}
-int
-sq_preprocess (SQModel model, int comp_ratio, unsigned char is_in_clip,
+int
+sq_preprocess (SQModel model, int comp_ratio, unsigned char is_in_clip,
unsigned char *data, int w, int h)
{
int i, m, b;
@@ -261,23 +261,23 @@ sq_preprocess (SQModel model, int comp_ratio, unsigned char is_in_clip,
temp = data[i];
data[i] = data[b -1 -i];
data[b - 1 - i] = temp;
- }
+ }
/* But clip frames are already right-side-up */
}
/*
- * POCK_CAM needs de-mirror-imaging, too. But if a photo is
- * compressed we de-mirror after decompression, so not here.
+ * POCK_CAM needs de-mirror-imaging, too. But if a photo is
+ * compressed we de-mirror after decompression, so not here.
*/
if ((model == SQ_MODEL_POCK_CAM) && (comp_ratio == 1)) {
for (i = 0; i < h; i++) {
- for (m = 0 ; m < w/2; m++) {
+ for (m = 0 ; m < w/2; m++) {
temp = data[w*i +m];
data[w*i + m] = data[w*i + w -1 -m];
data[w*i + w - 1 - m] = temp;
}
- }
+ }
}
return GP_OK;
-}
+}
diff --git a/camlibs/sq905/sq905.h b/camlibs/sq905/sq905.h
index 63c4a8f6d..1ba9ddb30 100644
--- a/camlibs/sq905/sq905.h
+++ b/camlibs/sq905/sq905.h
@@ -7,8 +7,8 @@
* A 'clip' is an autoshoot clip.
* A 'frame' is a single a picture out of a clip.
* An 'entry' corresponds to a line listed in the camera's configuration data,
- * part of which is a rudimentary allocation table (the 'catalog').
- * An entry, therefore, may be either a picture or a clip.
+ * part of which is a rudimentary allocation table (the 'catalog').
+ * An entry, therefore, may be either a picture or a clip.
* We reserve the word 'file' for the user fetchable file,
* that is, a picture or a frame.
*/
@@ -16,7 +16,7 @@
typedef enum {
SQ_MODEL_POCK_CAM,
SQ_MODEL_PRECISION,
- SQ_MODEL_MAGPIX,
+ SQ_MODEL_MAGPIX,
/* SQ_MODEL_913c, */
SQ_MODEL_DEFAULT
} SQModel;
@@ -46,17 +46,17 @@ int sq_delete_all (GPPort *, CameraPrivateLibrary *);
/* Those functions don't need data transfer with the camera */
int sq_get_num_frames (CameraPrivateLibrary *, int entry);
-
+
int sq_get_comp_ratio (CameraPrivateLibrary *, int entry);
int sq_get_picture_width (CameraPrivateLibrary *, int entry);
int sq_is_clip (CameraPrivateLibrary *, int entry);
int
-sq_preprocess (SQModel model, int comp_ratio,
- unsigned char is_in_clip,
+sq_preprocess (SQModel model, int comp_ratio,
+ unsigned char is_in_clip,
unsigned char *data, int w, int h);
int
-sq_decompress (SQModel model, unsigned char *output, unsigned char *data,
+sq_decompress (SQModel model, unsigned char *output, unsigned char *data,
int w, int h);
#endif
diff --git a/camlibs/st2205/library.c b/camlibs/st2205/library.c
index 5c52575ee..2b140c3f0 100644
--- a/camlibs/st2205/library.c
+++ b/camlibs/st2205/library.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -70,7 +70,7 @@ camera_abilities (CameraAbilitiesList *list)
a.usb_vendor = 0x1403;
a.usb_product= 0x0001;
a.operations = GP_OPERATION_NONE;
- a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
+ a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
GP_FOLDER_OPERATION_DELETE_ALL;
a.file_operations = GP_FILE_OPERATION_DELETE | GP_FILE_OPERATION_RAW;
return gp_abilities_list_append (list, a);
@@ -237,7 +237,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
ret = gp_file_set_mime_type (file, GP_MIME_PNG);
if (ret < 0) { gdFree (gdpng); return ret; }
- ret = gp_file_set_name (file, filename);
+ ret = gp_file_set_name (file, filename);
if (ret < 0) { gdFree (gdpng); return ret; }
ret = gp_file_append (file, gdpng, size);
@@ -250,7 +250,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
static int
-put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
+put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
CameraFileType type, CameraFile *file, void *data, GPContext *context)
{
#ifdef HAVE_LIBGD
@@ -443,7 +443,7 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int i, ret;
for (i = 0; i < ST2205_MAX_NO_FILES; i++) {
@@ -584,7 +584,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
char buf[2];
@@ -606,7 +606,7 @@ camera_exit (Camera *camera, GPContext *context)
}
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
int i, j, ret;
#if defined(HAVE_ICONV) && defined(HAVE_LANGINFO_H)
diff --git a/camlibs/st2205/st2205.c b/camlibs/st2205/st2205.c
index 5f441d82c..e59586e3b 100644
--- a/camlibs/st2205/st2205.c
+++ b/camlibs/st2205/st2205.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -50,7 +50,7 @@ static char *st2205_malloc_page_aligned(int size)
#ifdef HAVE_SYS_MMAN_H
int fd;
char *aligned;
-
+
fd = open ("/dev/zero", O_RDWR);
aligned = mmap (0, size, PROT_READ|PROT_WRITE,MAP_PRIVATE, fd, 0);
close (fd);
@@ -236,12 +236,12 @@ st2205_detect_mem_size(Camera *camera)
break;
}
- camera->pl->mem_size = 524288 << i;
+ camera->pl->mem_size = 524288 << i;
st2205_free_page_aligned(buf0, ST2205_BLOCK_SIZE);
st2205_free_page_aligned(buf1, ST2205_BLOCK_SIZE);
- return GP_OK;
+ return GP_OK;
}
static int
@@ -619,7 +619,7 @@ st2205_real_write_file(Camera *camera,
sizeof(header)))
BE16TOH(header.length);
- end = start + sizeof(header) +
+ end = start + sizeof(header) +
header.length;
} else
end = start + size;
@@ -658,7 +658,7 @@ st2205_real_write_file(Camera *camera,
}
}
}
-
+
/* No freespace found, try again with uv correction tables disabled */
if (camera->pl->compressed && allow_uv_corr)
return st2205_real_write_file (camera, filename, rgb24, buf,
diff --git a/camlibs/st2205/st2205.h b/camlibs/st2205/st2205.h
index 6f4f08d4c..dc55786ee 100644
--- a/camlibs/st2205/st2205.h
+++ b/camlibs/st2205/st2205.h
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
diff --git a/camlibs/st2205/st2205_decode.c b/camlibs/st2205/st2205_decode.c
index 3590b74a4..51de39fbc 100644
--- a/camlibs/st2205/st2205_decode.c
+++ b/camlibs/st2205/st2205_decode.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
diff --git a/camlibs/stv0674/library.c b/camlibs/stv0674/library.c
index d668c1c06..746637248 100644
--- a/camlibs/stv0674/library.c
+++ b/camlibs/stv0674/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/stv0674/library.h b/camlibs/stv0674/library.h
index dac37bac9..64379e31a 100644
--- a/camlibs/stv0674/library.h
+++ b/camlibs/stv0674/library.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/stv0674/stv0674.c b/camlibs/stv0674/stv0674.c
index 398ed5afa..18ef1f4c3 100644
--- a/camlibs/stv0674/stv0674.c
+++ b/camlibs/stv0674/stv0674.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -108,7 +108,7 @@ static int file_list_func (CameraFilesystem *fs, const char *folder,
return result;
}
if (count > 10000) { /* arbitrary limit to avoid resource exhaustion by malicious USB */
- GP_DEBUG("count %d is over 10000 arbitrary limit. Increase if needed.\n", count);
+ GP_DEBUG("count %d is over 10000 arbitrary limit. Increase if needed.\n", count);
return GP_ERROR_CORRUPTED_DATA;
}
diff --git a/camlibs/stv0674/stv0674.h b/camlibs/stv0674/stv0674.h
index bbc55dac5..041510f47 100644
--- a/camlibs/stv0674/stv0674.h
+++ b/camlibs/stv0674/stv0674.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/camlibs/stv0680/bayer.h b/camlibs/stv0680/bayer.h
index a3cdf951c..b7f72e89b 100644
--- a/camlibs/stv0680/bayer.h
+++ b/camlibs/stv0680/bayer.h
@@ -1,19 +1,19 @@
/*
* STV0680 Vision Camera Chipset Driver
- * Copyright 2000 Adam Harrison <adam@antispin.org>
- *
+ * Copyright 2000 Adam Harrison <adam@antispin.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -21,9 +21,9 @@
#ifndef BAYER_H
#define BAYER_H
-void bayer_unshuffle_preview(int w, int h, int scale,
+void bayer_unshuffle_preview(int w, int h, int scale,
unsigned char *raw, unsigned char *output);
-void light_enhance(int vw, int vh, int coarse, int fine,
+void light_enhance(int vw, int vh, int coarse, int fine,
unsigned char avg_pix_val, unsigned char *output);
#endif
diff --git a/camlibs/stv0680/demosaic_sharpen.h b/camlibs/stv0680/demosaic_sharpen.h
index 923a7c2f2..3ca352525 100644
--- a/camlibs/stv0680/demosaic_sharpen.h
+++ b/camlibs/stv0680/demosaic_sharpen.h
@@ -16,7 +16,7 @@ typedef enum _BayerTile{
#endif
void demosaic_sharpen (const int width, const int height,
- const unsigned char * const src_region,
- unsigned char * const dest_region,
+ const unsigned char * const src_region,
+ unsigned char * const dest_region,
const int alpha, const BayerTile bt);
#endif
diff --git a/camlibs/stv0680/library.h b/camlibs/stv0680/library.h
index a785e3718..f997be87f 100644
--- a/camlibs/stv0680/library.h
+++ b/camlibs/stv0680/library.h
@@ -1,17 +1,17 @@
/*
* STV0680 Vision Camera Chipset Driver
- * Copyright 2000 Adam Harrison <adam@antispin.org>
- *
+ * Copyright 2000 Adam Harrison <adam@antispin.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
diff --git a/camlibs/stv0680/saturate.c b/camlibs/stv0680/saturate.c
index b15460048..304b7ef94 100644
--- a/camlibs/stv0680/saturate.c
+++ b/camlibs/stv0680/saturate.c
@@ -16,7 +16,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
- * Simplified and modified by Kevin Sisson <kjsisson@bellsouth.net> for use
+ * Simplified and modified by Kevin Sisson <kjsisson@bellsouth.net> for use
* in the pencam program, December, 2001
*
* Integrated into gphoto2 by Marcus Meissner <marcus@jet.franken.de>, Dec 2001
@@ -25,7 +25,7 @@
#include <string.h>
#include "saturate.h"
-/* FIXME: should be variable, and user configurable. Which is problematic in
+/* FIXME: should be variable, and user configurable. Which is problematic in
* gphoto2 :/ */
#define HUE_DATA 40
#define LIGHTNESS_DATA 40
@@ -163,12 +163,12 @@ static void gimp_hls_to_rgb (int *hue, int *lightness, int *saturation)
static void hue_saturation_initialize (HueSaturationDialog *hsd)
{
int i;
-
+
for (i = 0; i < 7; i++)
{
hsd->hue[i] = 0.0;
hsd->lightness[i] = 0.0;
- hsd->saturation[i] = (double) (hsd->saturation_data)/2;
+ hsd->saturation[i] = (double) (hsd->saturation_data)/2;
}
}
@@ -294,9 +294,9 @@ void stv680_hue_saturation(
d[BLUE_PIX] = b;
s += 3; /* bytes/pixel = 3 */
- d += 3;
+ d += 3;
}
- src += 3*width;
+ src += 3*width;
dest += 3*width;
}
}
diff --git a/camlibs/stv0680/sharpen.c b/camlibs/stv0680/sharpen.c
index 02317f032..333386747 100644
--- a/camlibs/stv0680/sharpen.c
+++ b/camlibs/stv0680/sharpen.c
@@ -120,7 +120,7 @@ static void rgb_filter (int width, /* I - Width of line in pixels */
/** 'sharpen()' - Sharpen an image using a convolution filter. **/
void sharpen(int width, int height,
- unsigned char *src_region, unsigned char *dest_region,
+ unsigned char *src_region, unsigned char *dest_region,
int sharpen_percent
) {
unsigned char *src_rows[4], /* Source pixel rows */
@@ -157,7 +157,7 @@ void sharpen(int width, int height,
row = 1;
count = 1;
-
+
/** Sharpen... **/
for (y = 0; y < height; y ++)
@@ -205,7 +205,7 @@ void sharpen(int width, int height,
memcpy((dest_region + pitch*(y)), src_rows[(height-1)&3], pitch);
}
} /* for */
-
+
/** OK, we're done. Free all memory used... **/
for (row = 0; row < 4; row ++)
{
diff --git a/camlibs/stv0680/sharpen.h b/camlibs/stv0680/sharpen.h
index 1a31f891b..a6837715a 100644
--- a/camlibs/stv0680/sharpen.h
+++ b/camlibs/stv0680/sharpen.h
@@ -1,7 +1,7 @@
#ifndef __STV680_SHARPEN_H
#define __STV680_SHARPEN_H
void sharpen(int width, int height,
- unsigned char *src_region, unsigned char *dest_region,
+ unsigned char *src_region, unsigned char *dest_region,
int sharpen_percent
);
#endif
diff --git a/camlibs/stv0680/stv0680.c b/camlibs/stv0680/stv0680.c
index 39229a721..c49e39bb5 100644
--- a/camlibs/stv0680/stv0680.c
+++ b/camlibs/stv0680/stv0680.c
@@ -1,17 +1,17 @@
/*
* STV0680 Vision Camera Chipset Driver
- * Copyright 2000 Adam Harrison <adam@antispin.org>
- *
+ * Copyright 2000 Adam Harrison <adam@antispin.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -58,7 +58,7 @@ static const struct camera_to_usb {
/* You can search in google for them, using either:
* AAA 80 CIF
- * or
+ * or
* AAA 26 VGA
* It has been rebranded and rereleased dozens of times.
*/
@@ -95,9 +95,9 @@ static const struct camera_to_usb {
{ "DigitalDream:la ronde", 0x0553, 0x0202, 0 },
/* https://sf.net/tracker/index.php?func=detail&aid=1000498&group_id=8874&atid=358874 */
{ "DigitalDream:l'espion XS", 0x1183, 0x0001, 0 },
-
- /* reported by jerry white */
+
+ /* reported by jerry white */
{ "Argus:DC-1500", 0x0553, 0x0202, 1 },
/* reported by Philippe Libat <philippe@mandrakesoft.com>,
* serial only. */
@@ -126,14 +126,14 @@ static const struct camera_to_usb {
{ "Creative:Go Mini", 0x041e, 0x4007, 1 }
};
-int camera_id (CameraText *id)
+int camera_id (CameraText *id)
{
strcpy(id->text, "STV0680");
return (GP_OK);
}
-int camera_abilities (CameraAbilitiesList *list)
+int camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
unsigned int i;
@@ -156,7 +156,7 @@ int camera_abilities (CameraAbilitiesList *list)
a.status = GP_DRIVER_STATUS_PRODUCTION;
a.port |= GP_PORT_USB;
a.operations |= GP_OPERATION_CAPTURE_PREVIEW;
- a.usb_vendor = camera_to_usb[i].idVendor;
+ a.usb_vendor = camera_to_usb[i].idVendor;
a.usb_product = camera_to_usb[i].idProduct;
}
if (camera_to_usb[i].serial) {
@@ -170,8 +170,8 @@ int camera_abilities (CameraAbilitiesList *list)
return (GP_OK);
}
-static int file_list_func (CameraFilesystem *fs, const char *folder,
- CameraList *list, void *data, GPContext *context)
+static int file_list_func (CameraFilesystem *fs, const char *folder,
+ CameraList *list, void *data, GPContext *context)
{
Camera *camera = data;
int count, result;
@@ -198,7 +198,7 @@ static int get_file_func (CameraFilesystem *fs, const char *folder,
if(image_no < 0)
return image_no;
- gp_file_set_mime_type (file, GP_MIME_PNM);
+ gp_file_set_mime_type (file, GP_MIME_PNM);
switch (type) {
case GP_FILE_TYPE_NORMAL:
result = stv0680_get_image (camera->port, image_no, file);
@@ -253,20 +253,20 @@ static int camera_capture_preview (Camera *camera, CameraFile *file, GPContext *
if (result < 0)
return result;
- gp_file_set_mime_type (file, GP_MIME_PNM);
+ gp_file_set_mime_type (file, GP_MIME_PNM);
gp_file_set_data_and_size (file, data, size);
return (GP_OK);
}
-static int camera_summary (Camera *camera, CameraText *summary, GPContext *context)
+static int camera_summary (Camera *camera, CameraText *summary, GPContext *context)
{
stv0680_summary(camera->port,summary->text);
return (GP_OK);
}
-static int camera_about (Camera *camera, CameraText *about, GPContext *context)
+static int camera_about (Camera *camera, CameraText *about, GPContext *context)
{
- strcpy (about->text,
+ strcpy (about->text,
_("STV0680\n"
"Adam Harrison <adam@antispin.org>\n"
"Driver for cameras using the STV0680 processor ASIC.\n"
@@ -346,7 +346,7 @@ static CameraFilesystemFuncs fsfuncs = {
.storage_info_func = storage_info_func
};
-int camera_init (Camera *camera, GPContext *context)
+int camera_init (Camera *camera, GPContext *context)
{
GPPortSettings settings;
@@ -358,7 +358,7 @@ int camera_init (Camera *camera, GPContext *context)
gp_port_get_settings(camera->port, &settings);
switch(camera->port->type) {
- case GP_PORT_SERIAL:
+ case GP_PORT_SERIAL:
gp_port_set_timeout(camera->port, 1000);
settings.serial.speed = 115200;
settings.serial.bits = 8;
diff --git a/camlibs/stv0680/stv0680.h b/camlibs/stv0680/stv0680.h
index 86a396277..251497cfc 100644
--- a/camlibs/stv0680/stv0680.h
+++ b/camlibs/stv0680/stv0680.h
@@ -1,17 +1,17 @@
/*
* STV0680 Vision Camera Chipset Driver
- * Copyright 2000 Adam Harrison <adam@antispin.org>
- *
+ * Copyright 2000 Adam Harrison <adam@antispin.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -123,7 +123,7 @@ struct stv680_image_header { /* For all upload and get image header */
unsigned char flags;
#define IMAGE_IS_VALID 0x01
#define IMAGE_FROM_STREAM 0x04
-#define IMAGE_FIRST_OF_MOVIE 0x10
+#define IMAGE_FIRST_OF_MOVIE 0x10
};
#define CMDID_GRAB_UPLOAD 0x89
diff --git a/camlibs/sx330z/library.c b/camlibs/sx330z/library.c
index bea83e2bd..7dbb98846 100644
--- a/camlibs/sx330z/library.c
+++ b/camlibs/sx330z/library.c
@@ -6,10 +6,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -61,12 +61,12 @@
#define CR(res) { int r=(res);if (r<0) return (r);}
/*
- * supported cameras :
+ * supported cameras :
* - Traveler SX330z (Aldi cam)
* - Other SX330z / SX3300z Models ?
* please report if you have others that are working
*/
-
+
static const struct
{
char *model;
@@ -90,9 +90,9 @@ static const struct
/*
- * camera abilities
+ * camera abilities
*/
-int
+int
camera_abilities (CameraAbilitiesList *list)
{
int i;
@@ -110,7 +110,7 @@ camera_abilities (CameraAbilitiesList *list)
a.file_operations = GP_FILE_OPERATION_PREVIEW|
GP_FILE_OPERATION_DELETE|
GP_FILE_OPERATION_EXIF;
- a.folder_operations = GP_FOLDER_OPERATION_NONE;
+ a.folder_operations = GP_FOLDER_OPERATION_NONE;
CR(gp_abilities_list_append(list,a));
} /* all models... */
return(GP_OK);
@@ -120,9 +120,9 @@ camera_abilities (CameraAbilitiesList *list)
/*
- * file list function
+ * file list function
*/
-static int
+static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
@@ -132,7 +132,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
int pcnt,ecnt; /* pagecounter, entrycounter*/
struct traveler_toc_page toc;
int id;
-
+
/* get number of TOC pages */
CR (sx330z_get_toc_num_pages (camera, context, &tpages));
/* Read the TOC pages */
@@ -152,7 +152,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
info.file.size = toc.entries[ecnt].size;
info.file.permissions = GP_FILE_PERM_READ |
GP_FILE_PERM_DELETE;
- strcpy (info.file.type,GP_MIME_JPEG);
+ strcpy (info.file.type,GP_MIME_JPEG);
sprintf (fn, "%.12s", toc.entries[ecnt].name);
/*
@@ -167,14 +167,14 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
if (gp_context_cancel (context) == GP_CONTEXT_FEEDBACK_CANCEL)
return (GP_ERROR_CANCEL);
}
-
+
gp_context_progress_stop (context, id);
return (GP_OK);
}
-static int
+static int
get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
CameraFileType type, CameraFile *file, void *user_data,
GPContext *context)
@@ -182,7 +182,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
Camera *camera = user_data;
char *data = NULL;
unsigned long int size = 0;
-
+
switch (type) {
case GP_FILE_TYPE_EXIF:
gp_file_set_mime_type (file, GP_MIME_RAW);
@@ -200,7 +200,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
return (GP_ERROR_NOT_SUPPORTED);
}
gp_file_set_data_and_size (file, data, size);
-
+
return (GP_OK);
}
@@ -208,7 +208,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/*
* Delete file function (working ..)
*/
-static int
+static int
del_file_func(CameraFilesystem *fs,const char *folder,const char *filename,
void *user_data,GPContext *context)
{
@@ -221,9 +221,9 @@ del_file_func(CameraFilesystem *fs,const char *folder,const char *filename,
/*
- * Camera ID
+ * Camera ID
*/
-int
+int
camera_id(CameraText *id)
{
strcpy(id->text,"Traveler SX330z");
@@ -234,9 +234,9 @@ camera_id(CameraText *id)
/*
- * Camera about
+ * Camera about
*/
-static int
+static int
camera_about(Camera *camera,CameraText *about,GPContext *context)
{
strcpy(about->text,_("(Traveler) SX330z Library (And other Aldi-cams).\n"
@@ -251,7 +251,7 @@ camera_about(Camera *camera,CameraText *about,GPContext *context)
* camera_exit
* release allocated memory
*/
-int
+int
camera_exit(Camera *camera, GPContext *context)
{
if (camera->pl)
@@ -269,15 +269,15 @@ static CameraFilesystemFuncs fsfuncs = {
/*
* OK, lets get serious !
*/
-int
+int
camera_init(Camera *camera,GPContext *context)
{
GPPortSettings settings;
CameraAbilities abilities;
/* try to contact the camera ...*/
/*CR(gp_port_get_settings(camera->port,&settings));*/
-
- camera->functions->about=camera_about;
+
+ camera->functions->about=camera_about;
camera->functions->exit=camera_exit;
gp_port_get_settings(camera->port,&settings);
if (camera->port->type!=GP_PORT_USB)
@@ -287,12 +287,12 @@ camera_init(Camera *camera,GPContext *context)
}
/* GP_DEBUG("camera_init : in = %x",camera->port->settings.usb.inep);*/
CR(gp_port_set_settings(camera->port,settings));
- CR(gp_port_set_timeout(camera->port,TIMEOUT));
+ CR(gp_port_set_timeout(camera->port,TIMEOUT));
CR(gp_filesystem_set_funcs(camera->fs, &fsfuncs, camera));
-
+
camera->pl=malloc(sizeof(CameraPrivateLibrary));
- if (!camera->pl)
+ if (!camera->pl)
return(GP_ERROR_NO_MEMORY);
CR(gp_camera_get_abilities(camera, &abilities));
diff --git a/camlibs/sx330z/sx330z.c b/camlibs/sx330z/sx330z.c
index 1ecb237c9..a4b4bdbc9 100644
--- a/camlibs/sx330z/sx330z.c
+++ b/camlibs/sx330z/sx330z.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -78,22 +78,22 @@ sx330z_fill_toc_page(uint8_t *buf, struct traveler_toc_page *toc)
* SX330z initialization
* (not really an initialization, but lets check if we have contact )
*/
-int
+int
sx330z_init(Camera *camera, GPContext *context)
{
/* struct traveler_ack ack;*/
uint8_t trxbuf[0x10];
int ret;
ret = gp_port_usb_msg_read(camera->port, USB_REQ_RESERVED, SX330Z_REQUEST_INIT, 0, (char *)trxbuf, 0x10);
- if (ret != 0x10) return(GP_ERROR); /* more specific about error ? */
- return(GP_OK);
+ if (ret != 0x10) return(GP_ERROR); /* more specific about error ? */
+ return(GP_OK);
} /* sx330z_init */
/*
- * Read block described by req
+ * Read block described by req
*/
-static int
+static int
sx330z_read_block(Camera *camera, GPContext *context, struct traveler_req *req, uint8_t *buf)
{
int ret;
@@ -108,7 +108,7 @@ sx330z_read_block(Camera *camera, GPContext *context, struct traveler_req *req,
if (ret != req->size)return(GP_ERROR_IO_READ);
/* 3. read Ack */
ret = gp_port_read(camera->port, (char *)trxbuf, 0x10);
- if (ret != 0x10) return(GP_ERROR);
+ if (ret != 0x10) return(GP_ERROR);
/* FIXME : Security check ???*/
return(GP_OK);
} /* read block */
@@ -117,7 +117,7 @@ sx330z_read_block(Camera *camera, GPContext *context, struct traveler_req *req,
/*
* Get TOC size
*/
-int
+int
sx330z_get_toc_num_pages(Camera *camera, GPContext *context, int32_t *pages)
{
struct traveler_ack ack;
@@ -136,35 +136,35 @@ sx330z_get_toc_num_pages(Camera *camera, GPContext *context, int32_t *pages)
if (ack.size == 0x200) (*pages)--;
if ((ack.size > 0x200)&&
(((ack.size - 0xc) % 0x200) == 0)) (*pages)--;
-
+
return(GP_OK);
} /* get toc size */
/*
- * Get TOC
- * Read a single TOC page
+ * Get TOC
+ * Read a single TOC page
* specified by "page"
*/
-int
+int
sx330z_get_toc_page(Camera *camera, GPContext *context, struct traveler_toc_page *TOC, int page)
{
int ret;
struct traveler_req req;
uint8_t tocbuf[0x200];
-
+
req.always1 = 1;
- req.requesttype = SX330Z_REQUEST_TOC; /* 0x03 */
+ req.requesttype = SX330Z_REQUEST_TOC; /* 0x03 */
req.offset = 0x200 * page; /* offset */
req.timestamp = 0x123; /* ? */
req.size = 0x200; /* 512 Bytes / tocpage*/
req.data = 0; /* ? */
memset(req.filename, 0, 12); /* ? */
-
+
ret=sx330z_read_block(camera,context,&req,tocbuf);
if (ret<0) return(ret);
-
+
sx330z_fill_toc_page(tocbuf,TOC); /* convert */
-
+
/* TOC sanity check */
if ((TOC->numEntries < 0) || (TOC->numEntries > 25)) return(GP_ERROR_CORRUPTED_DATA);
return(GP_OK);
@@ -172,10 +172,10 @@ sx330z_get_toc_page(Camera *camera, GPContext *context, struct traveler_toc_page
/*
- * get data
- * could be Image / Thumbnail
+ * get data
+ * could be Image / Thumbnail
*/
-int
+int
sx330z_get_data(Camera *camera, GPContext *context, const char *filename,
char **data, unsigned long int *size, int thumbnail)
{
@@ -185,16 +185,16 @@ sx330z_get_data(Camera *camera, GPContext *context, const char *filename,
int found;
int tocpages, tcnt, ecnt;
struct traveler_toc_page toc;
- int id;/* progress ? */
+ int id;/* progress ? */
pages = 0;
found = 0;
memcpy(req.filename, filename, 12);
-
- if (thumbnail == SX_THUMBNAIL)
+
+ if (thumbnail == SX_THUMBNAIL)
{
if (camera->pl->usb_product == USB_PRODUCT_MD9700)
pages = 7; /* first 28k only*/
- else
+ else
pages = 5; /* first 20k only */
req.filename[0] = 'T'; /* 'T'humbnail indicator ?*/
id = gp_context_progress_start(context, 0x1000 * pages, "Thumbnail %.4s _", &filename[4]);
@@ -222,8 +222,8 @@ sx330z_get_data(Camera *camera, GPContext *context, const char *filename,
pages = *size / 0x1000;
id = gp_context_progress_start(context, *size, "Picture %.4s _", &filename[4]);
} /* real image */
-
- *size = 4096 * pages;
+
+ *size = 4096 * pages;
*data = malloc(*size);
dptr = (uint8_t *)*data;
/* load all parts */
@@ -238,7 +238,7 @@ sx330z_get_data(Camera *camera, GPContext *context, const char *filename,
gp_context_progress_update(context, id, (cnt + 1) * 0x1000);
sx330z_read_block(camera,context,&req,dptr); /* read data */
dptr += 4096;
- }/* download imageparts */
+ }/* download imageparts */
gp_context_progress_stop(context,id);
return(GP_OK);
} /* sx330z_get_data */
@@ -246,9 +246,9 @@ sx330z_get_data(Camera *camera, GPContext *context, const char *filename,
/*
- * delete file
+ * delete file
*/
-int
+int
sx330z_delete_file(Camera *camera, GPContext *context, const char *filename)
{
struct traveler_req req;
@@ -274,7 +274,7 @@ sx330z_delete_file(Camera *camera, GPContext *context, const char *filename)
ret = gp_port_usb_msg_read(camera->port,
USB_REQ_RESERVED, SX330Z_REQUEST_DELETE, 0, (char *)trxbuf, 0x10);
if (ret != 0x10) return(GP_ERROR);
-
+
gp_context_progress_stop(context, id); /* stop context */
return(GP_OK);
} /* sx330z delete file */
diff --git a/camlibs/sx330z/sx330z.h b/camlibs/sx330z/sx330z.h
index 5f16a18b4..93365b609 100644
--- a/camlibs/sx330z/sx330z.h
+++ b/camlibs/sx330z/sx330z.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -36,7 +36,7 @@
/* this one should work */
#define USB_PRODUCT_SX330Z 0x3300
-/* very experimental !!!
+/* very experimental !!!
* Please report if this works
*/
#define USB_PRODUCT_SX410Z 0x4100
@@ -72,7 +72,7 @@ struct traveler_toc_page
struct traveler_toc_entry entries[25]; /* entries */
};
-struct _CameraPrivateLibrary
+struct _CameraPrivateLibrary
{
int usb_product; /* different Thumbnail size */
};
@@ -94,7 +94,7 @@ struct traveler_req
struct traveler_ack
{
int32_t always3; /* 3 */
- int32_t timestamp; /* not sure */
+ int32_t timestamp; /* not sure */
int32_t size; /* for TOC and other transfers */
int32_t dontknow; /* always 0 */
};
@@ -108,13 +108,13 @@ int sx330z_init(Camera *camera,GPContext *context);
/*
- * Get number of TOC pages
+ * Get number of TOC pages
*/
int sx330z_get_toc_num_pages(Camera *camera,GPContext *context, int32_t *pages);
/*
- * Get TOC
+ * Get TOC
*/
int sx330z_get_toc_page(Camera *camera,GPContext *context,struct traveler_toc_page *toc,int page);
@@ -127,7 +127,7 @@ int sx330z_get_data(Camera *camera,GPContext *context, const char* filename,
/*
- * Delete image
+ * Delete image
*/
int sx330z_delete_file(Camera *camera,GPContext *context,const char *filename);
diff --git a/camlibs/template/template.c b/camlibs/template/template.c
index 54d8366d5..ad5875886 100644
--- a/camlibs/template/template.c
+++ b/camlibs/template/template.c
@@ -11,10 +11,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -32,13 +32,13 @@
*
* We implement the camlib API functions last in this file because
* camera_init() must reference all the object member functions and by
- * making camera_init() the last function in this file, we can avoid
+ * making camera_init() the last function in this file, we can avoid
* the need for forward declarations of the object member functions.
*
* \section linknote Note about "static" functions and exporting symbols
*
* The build system uses libtool to explicitly specify the list of
- * exported symbols. Only the three functions of the camlib API
+ * exported symbols. Only the three functions of the camlib API
* (camera_init(), camera_id(), and camera_abilities()) are exported.
*
* Therefore it doesn't matter whether you declare your other
@@ -100,7 +100,7 @@
*/
int camera_exit (Camera *camera, GPContext *context);
int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
return GP_OK;
}
@@ -113,7 +113,7 @@ camera_exit (Camera *camera, GPContext *context)
*/
int camera_config_get (Camera *camera, CameraWidget **window, GPContext *context);
int
-camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
+camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
{
gp_widget_new (GP_WIDGET_WINDOW, "Camera Configuration", window);
@@ -132,7 +132,7 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
*/
int camera_config_set (Camera *camera, CameraWidget *window, GPContext *context);
int
-camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
+camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
{
/*
* Check if the widgets' values have changed. If yes, tell the camera.
@@ -145,7 +145,7 @@ camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
/**
* Capture a preview and return the data in the given file (again,
* use gp_file_set_data_and_size, gp_file_set_mime_type, etc.).
- * libgphoto2 assumes that previews are NOT stored on the camera's
+ * libgphoto2 assumes that previews are NOT stored on the camera's
* disk. If your camera does, please delete it from the camera.
*
* This function is a method of the Camera object.
@@ -176,7 +176,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
/**
- * Fill out the summary with textual information about the current
+ * Fill out the summary with textual information about the current
* state of the camera (like pictures taken, etc.).
*
* This function is a method of the Camera object.
@@ -192,7 +192,7 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
/**
* Return the camera drivers manual.
- * If you would like to tell the user some information about how
+ * If you would like to tell the user some information about how
* to use the camera or the driver, this is the place to do.
*
* This function is a method of the Camera object.
@@ -329,7 +329,7 @@ delete_all_func (CameraFilesystem *fs, const char *folder, void *data,
/**
* Get the file info here and write it to space provided by caller.
- *
+ *
* \param info Space provided by caller in which file info is written.
*
* This function is a CameraFilesystem method.
@@ -420,7 +420,7 @@ int
storage_info_func (CameraFilesystem *fs,
CameraStorageInformation **storageinformations,
int *nrofstorageinformations, void *data,
- GPContext *context)
+ GPContext *context)
{
/*Camera *camera = data;*/
@@ -450,7 +450,7 @@ storage_info_func (CameraFilesystem *fs,
* This is a camlib API function.
*/
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "REPLACE WITH UNIQUE LIBRARY ID");
@@ -473,7 +473,7 @@ camera_id (CameraText *id)
* This is a camlib API function.
*/
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -482,9 +482,9 @@ camera_abilities (CameraAbilitiesList *list)
a.status = GP_DRIVER_STATUS_PRODUCTION;
a.port = GP_PORT_SERIAL | GP_PORT_USB;
a.speed[0] = 0;
- a.operations = GP_OPERATION_CAPTURE_PREVIEW |
+ a.operations = GP_OPERATION_CAPTURE_PREVIEW |
GP_CAPTURE_IMAGE;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
@@ -523,7 +523,7 @@ CameraFilesystemFuncs fsfuncs = {
* This is a camlib API function.
*/
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
/* First, set up all the function pointers */
camera->functions->exit = camera_exit;
@@ -543,9 +543,9 @@ camera_init (Camera *camera, GPContext *context)
* already open). You just have to use functions like
* gp_port_timeout_set, gp_port_settings_get, gp_port_settings_set.
*/
-
+
/*
- * Once you have configured the port, you should check if a
+ * Once you have configured the port, you should check if a
* connection to the camera can be established.
*/
diff --git a/camlibs/topfield/crc16.c b/camlibs/topfield/crc16.c
index 877dab055..8668c2919 100644
--- a/camlibs/topfield/crc16.c
+++ b/camlibs/topfield/crc16.c
@@ -18,7 +18,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/crc16.h b/camlibs/topfield/crc16.h
index 3bdb4a584..f7904c316 100644
--- a/camlibs/topfield/crc16.h
+++ b/camlibs/topfield/crc16.h
@@ -17,7 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/mjd.c b/camlibs/topfield/mjd.c
index d1cff0688..20282fa6f 100644
--- a/camlibs/topfield/mjd.c
+++ b/camlibs/topfield/mjd.c
@@ -15,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/mjd.h b/camlibs/topfield/mjd.h
index eeb4715c7..cfa9d029c 100644
--- a/camlibs/topfield/mjd.h
+++ b/camlibs/topfield/mjd.h
@@ -15,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/puppy.c b/camlibs/topfield/puppy.c
index 0122380e5..9c481fbcc 100644
--- a/camlibs/topfield/puppy.c
+++ b/camlibs/topfield/puppy.c
@@ -16,7 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
@@ -540,7 +540,7 @@ static void finalStats(uint64_t bytes, time_t startTime)
#endif
static int
-camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
+camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
{
CameraWidget *section, *turbo;
char buf[1024];
@@ -573,7 +573,7 @@ camera_config_get (Camera *camera, CameraWidget **window, GPContext *context)
static int
-camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
+camera_config_set (Camera *camera, CameraWidget *window, GPContext *context)
{
int ret;
CameraWidget *turbo;
@@ -1065,7 +1065,7 @@ static int
storage_info_func (CameraFilesystem *fs,
CameraStorageInformation **storageinformations,
int *nrofstorageinformations, void *data,
- GPContext *context)
+ GPContext *context)
{
Camera *camera = data;
int r;
@@ -1154,7 +1154,7 @@ make_dir_func (CameraFilesystem *fs, const char *folder, const char *foldername,
/**********************************************************************/
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "Topfield 5000 PVR");
return GP_OK;
@@ -1162,7 +1162,7 @@ camera_id (CameraText *id)
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -1208,7 +1208,7 @@ camera_exit (Camera *camera, GPContext *context)
}
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
char *curloc;
/* First, set up all the function pointers */
diff --git a/camlibs/topfield/tf_bytes.c b/camlibs/topfield/tf_bytes.c
index b39b4bb45..b28104b6f 100644
--- a/camlibs/topfield/tf_bytes.c
+++ b/camlibs/topfield/tf_bytes.c
@@ -15,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/tf_bytes.h b/camlibs/topfield/tf_bytes.h
index f5859b6e6..4e8241db6 100644
--- a/camlibs/topfield/tf_bytes.h
+++ b/camlibs/topfield/tf_bytes.h
@@ -15,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/usb_io.c b/camlibs/topfield/usb_io.c
index 87356d36f..342447531 100644
--- a/camlibs/topfield/usb_io.c
+++ b/camlibs/topfield/usb_io.c
@@ -15,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/topfield/usb_io.h b/camlibs/topfield/usb_io.h
index ffa996603..fda626d72 100644
--- a/camlibs/topfield/usb_io.h
+++ b/camlibs/topfield/usb_io.h
@@ -18,7 +18,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with puppy; if not, write to the
+ along with puppy; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
diff --git a/camlibs/toshiba/pdrm11/library.c b/camlibs/toshiba/pdrm11/library.c
index 6169c490d..1b7964315 100644
--- a/camlibs/toshiba/pdrm11/library.c
+++ b/camlibs/toshiba/pdrm11/library.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -45,7 +45,7 @@
#define GP_MODULE "Toshiba"
int
-camera_id (CameraText *id)
+camera_id (CameraText *id)
{
strcpy(id->text, "toshiba-pdrm11");
@@ -54,7 +54,7 @@ camera_id (CameraText *id)
int
-camera_abilities (CameraAbilitiesList *list)
+camera_abilities (CameraAbilitiesList *list)
{
CameraAbilities a;
@@ -66,7 +66,7 @@ camera_abilities (CameraAbilitiesList *list)
a.usb_vendor = 0x1132;
a.usb_product = 0x4337;
a.operations = GP_OPERATION_NONE;
- a.file_operations = GP_FILE_OPERATION_DELETE |
+ a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_PREVIEW;
a.folder_operations = GP_FOLDER_OPERATION_NONE;
@@ -77,7 +77,7 @@ camera_abilities (CameraAbilitiesList *list)
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
return (GP_OK);
}
@@ -90,7 +90,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
{
int picNum;
Camera *camera = data;
-
+
switch(type){
case GP_FILE_TYPE_PREVIEW:
case GP_FILE_TYPE_NORMAL:
@@ -140,7 +140,7 @@ static CameraFilesystemFuncs fsfuncs = {
};
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
/* First, set up all the function pointers */
camera->functions->exit = camera_exit;
diff --git a/camlibs/toshiba/pdrm11/pdrm11.c b/camlibs/toshiba/pdrm11/pdrm11.c
index 8fb7f2a54..9083d766f 100644
--- a/camlibs/toshiba/pdrm11/pdrm11.c
+++ b/camlibs/toshiba/pdrm11/pdrm11.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -41,7 +41,7 @@ int pdrm11_init(GPPort *port)
{
unsigned char buf[20];
int timeout = 50;
-
+
gp_port_set_timeout(port,1000);
/* exactly what windows driver does */
@@ -60,7 +60,7 @@ int pdrm11_init(GPPort *port)
GP_DEBUG("PDRM11_CMD_ZERO: %x %x", buf[0], buf[1]);
return(GP_ERROR);
}
-
+
/* wait til the camera is ready */
do {
@@ -71,7 +71,7 @@ int pdrm11_init(GPPort *port)
if( gp_port_usb_msg_read(port, 0x01, PDRM11_CMD_READY, 0, (char *)buf, 4) == -ETIMEDOUT )
timeout = 0;
} while( !((buf[3] == 0x25) && (buf[0] == 1)) && timeout );
-
+
/* what good is this? */
usleep(400000);
@@ -97,7 +97,7 @@ int pdrm11_get_filenames(GPPort *port, CameraList *list)
numPics = le16atoh(&buf[2]) + (le16atoh(&buf[0]) * 1024);
GP_DEBUG("found %d pictures", numPics);
-
+
for(i=1; i<numPics+1; i++) {
CHECK( pdrm11_select_file(port, i) );
@@ -126,7 +126,7 @@ static int pdrm11_select_file(GPPort *port, uint16_t file)
uint16_t picNum = htole16(file);
uint16_t file_type;
-
+
/* byte 4 of PDRM11_CMD_GET_INFO determines if the file is a jpeg or tiff */
CHECK(gp_port_usb_msg_read(port, 0x01, PDRM11_CMD_GET_INFO, file, buf, 8));
file_type = htole16(buf[4]);
@@ -148,7 +148,7 @@ static int pdrm11_ping(GPPort *port)
#endif
-int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType type,
+int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType type,
CameraFile *file, GPPort *port, uint16_t picNum)
{
uint32_t size = 0;
@@ -160,7 +160,7 @@ int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType t
int ret;
int file_type;
-
+
gp_port_set_timeout(port,10000);
CHECK( pdrm11_select_file(port, picNum) );
@@ -170,9 +170,9 @@ int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType t
CHECK( gp_port_usb_msg_read(port, 0x01, PDRM11_CMD_GET_THUMBSIZE, picNum, (char *)buf, 14) );
thumbsize = le16atoh( &buf[8] );
-
+
/* add 1 to file size only for jpeg thumbnails */
- if(file_type == 1) {
+ if(file_type == 1) {
GP_DEBUG("thumbnail file_type: %s.", "jpeg");
size = (uint32_t)thumbsize + 1;
} else if(file_type == 2) {
@@ -225,7 +225,7 @@ int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType t
image[i+1] = temp;
}
}
-
+
gp_file_set_mime_type(file, GP_MIME_JPEG);
gp_file_set_data_and_size(file, (char *)image, size);
diff --git a/camlibs/toshiba/pdrm11/pdrm11.h b/camlibs/toshiba/pdrm11/pdrm11.h
index 01bb328d7..5cc2534ef 100644
--- a/camlibs/toshiba/pdrm11/pdrm11.h
+++ b/camlibs/toshiba/pdrm11/pdrm11.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -76,7 +76,7 @@
int pdrm11_init(GPPort *port);
-int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType type,
+int pdrm11_get_file(CameraFilesystem *fs, const char *filename, CameraFileType type,
CameraFile *file, GPPort *port, uint16_t picNum);
int pdrm11_get_filenames(GPPort *port, CameraList *list);
int pdrm11_delete_file(GPPort *port, int picNum);
diff --git a/camlibs/tp6801/library.c b/camlibs/tp6801/library.c
index 3eb78b1d3..4720ce638 100644
--- a/camlibs/tp6801/library.c
+++ b/camlibs/tp6801/library.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -77,7 +77,7 @@ camera_abilities (CameraAbilitiesList *list)
a.usb_vendor = tp6801_devinfo[i].vendor_id;
a.usb_product= tp6801_devinfo[i].product_id;
a.operations = GP_OPERATION_NONE;
- a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
+ a.folder_operations = GP_FOLDER_OPERATION_PUT_FILE |
GP_FOLDER_OPERATION_DELETE_ALL;
a.file_operations = GP_FILE_OPERATION_DELETE |
GP_FILE_OPERATION_RAW;
@@ -206,7 +206,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
ret = gp_file_set_mime_type (file, GP_MIME_PNG);
if (ret < 0) { gdFree (gdpng); return ret; }
- ret = gp_file_set_name (file, filename);
+ ret = gp_file_set_name (file, filename);
if (ret < 0) { gdFree (gdpng); return ret; }
ret = gp_file_append (file, gdpng, size);
@@ -219,7 +219,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
static int
-put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
+put_file_func (CameraFilesystem *fs, const char *folder, const char *name,
CameraFileType type, CameraFile *file, void *data, GPContext *context)
{
#ifdef HAVE_LIBGD
@@ -354,7 +354,7 @@ static int
file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
- Camera *camera = data;
+ Camera *camera = data;
int i, count, present;
char buf[30];
@@ -461,7 +461,7 @@ camera_set_config (Camera *camera, CameraWidget *window, GPContext *context)
}
static int
-camera_exit (Camera *camera, GPContext *context)
+camera_exit (Camera *camera, GPContext *context)
{
char buf[2];
@@ -477,7 +477,7 @@ camera_exit (Camera *camera, GPContext *context)
}
int
-camera_init (Camera *camera, GPContext *context)
+camera_init (Camera *camera, GPContext *context)
{
CameraAbilities a;
int ret;
diff --git a/camlibs/tp6801/tp6801-dump.c b/camlibs/tp6801/tp6801-dump.c
index 663108db8..7563f2511 100644
--- a/camlibs/tp6801/tp6801-dump.c
+++ b/camlibs/tp6801/tp6801-dump.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -36,7 +36,7 @@ void tp6801_send_cmd(int fd, int rw, int cmd, int offset, unsigned char *data, i
unsigned char cmd_buffer[16];
memset(cmd_buffer, 0, sizeof(cmd_buffer));
- cmd_buffer[0] = cmd;
+ cmd_buffer[0] = cmd;
cmd_buffer[1] = 0x11;
cmd_buffer[2] = 0x31;
cmd_buffer[3] = 0x0f;
@@ -120,6 +120,6 @@ int main(int argc, char* argv[])
#endif
fclose(f);
close(fd);
-
+
return 0;
}
diff --git a/camlibs/tp6801/tp6801.c b/camlibs/tp6801/tp6801.c
index f73154798..6cc095ac5 100644
--- a/camlibs/tp6801/tp6801.c
+++ b/camlibs/tp6801/tp6801.c
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -78,7 +78,7 @@ tp6801_set_time_and_date(Camera *camera, struct tm *t)
char sense_buffer[32];
memset (cmd_buffer, 0, sizeof (cmd_buffer));
-
+
cmd_buffer[0] = TP6801_SET_TIME;
cmd_buffer[1] = 0x11;
cmd_buffer[2] = 0x31;
@@ -323,7 +323,7 @@ int
tp6801_max_filecount(Camera *camera)
{
int free_mem, size;
-
+
size = tp6801_filesize (camera);
free_mem = camera->pl->mem_size - TP6801_PICTURE_OFFSET(0, size);
free_mem -= TP6801_CONST_DATA_SIZE;
@@ -691,7 +691,7 @@ tp6801_commit(Camera *camera)
camera->pl->page_state[TP6801_PAT_PAGE] |= TP6801_PAGE_DIRTY;
}
- /* And commit the block with the PAT */
+ /* And commit the block with the PAT */
CHECK (tp6801_commit_block (camera, 0))
return GP_OK;
diff --git a/camlibs/tp6801/tp6801.h b/camlibs/tp6801/tp6801.h
index b6210a877..5a47b4146 100644
--- a/camlibs/tp6801/tp6801.h
+++ b/camlibs/tp6801/tp6801.h
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
diff --git a/coverity-model.c b/coverity-model.c
index 9874ed3f4..a56e2739a 100644
--- a/coverity-model.c
+++ b/coverity-model.c
@@ -61,7 +61,7 @@ void gp_log_data (const char *domain, const char *data, unsigned int size, const
}
uint16_t
-ptp_transaction (PTPParams* params, PTPContainer* ptp,
+ptp_transaction (PTPParams* params, PTPContainer* ptp,
uint16_t flags, uint64_t sendlen,
unsigned char **data, unsigned int *recvlen) {
if ((flags & 0xff) == 0x2) {
diff --git a/examples/best-iso.c b/examples/best-iso.c
index 84f96367a..0516cc42f 100644
--- a/examples/best-iso.c
+++ b/examples/best-iso.c
@@ -1,4 +1,4 @@
-/*
+/*
* This program tries various ISOs for best ISO with a shutterspeed limit
*
* compile with: gcc -Wall -o best-iso best-iso.c -lgphoto2 -lgphoto2_port
diff --git a/examples/config.c b/examples/config.c
index e3ff63e32..fd07a3a23 100644
--- a/examples/config.c
+++ b/examples/config.c
@@ -155,7 +155,7 @@ out:
/*
* This enables/disables the specific canon capture mode.
- *
+ *
* For non canons this is not required, and will just return
* with an error (but without negative effects).
*/
diff --git a/examples/focus.c b/examples/focus.c
index d7ae3f6fa..cb896ab10 100644
--- a/examples/focus.c
+++ b/examples/focus.c
@@ -190,7 +190,7 @@ camera_manual_focus (Camera *camera, int xx, GPContext *context) {
fprintf (stderr, "could not get widget value: %d\n", ret);
goto out;
}
-
+
switch (xx) { /* Range is on Nikon from -32768 <-> 32768 */
case -3: rval = -1024;break;
case -2: rval = -512;break;
diff --git a/examples/lunkwill-canon-capture.c b/examples/lunkwill-canon-capture.c
index f7f4280e6..5ceb04a1d 100644
--- a/examples/lunkwill-canon-capture.c
+++ b/examples/lunkwill-canon-capture.c
@@ -1,13 +1,13 @@
/* compile with gcc -Wall -o canon-capture -lgphoto2 canon-capture.c
* This code released into the public domain 21 July 2008
- *
+ *
* This program does the equivalent of:
* gphoto2 --shell
* > set-config capture=1
* > capture-image-and-download
* compile with gcc -Wall -o canon-capture -lgphoto2 canon-capture.c
*
- * Taken from: http://credentiality2.blogspot.com/2008/07/linux-libgphoto2-image-capture-from.html
+ * Taken from: http://credentiality2.blogspot.com/2008/07/linux-libgphoto2-image-capture-from.html
*/
#include <stdlib.h>
diff --git a/examples/preview.c b/examples/preview.c
index 162e59664..453be553c 100644
--- a/examples/preview.c
+++ b/examples/preview.c
@@ -1,13 +1,13 @@
/* compile with gcc -Wall -o canon-capture -lgphoto2 canon-capture.c
* This code released into the public domain 21 July 2008
- *
+ *
* This program does the equivalent of:
* gphoto2 --shell
* > set-config capture=1
* > capture-image-and-download
* compile with gcc -Wall -o canon-capture -lgphoto2 canon-capture.c
*
- * Taken from: http://credentiality2.blogspot.com/2008/07/linux-libgphoto2-image-capture-from.html
+ * Taken from: http://credentiality2.blogspot.com/2008/07/linux-libgphoto2-image-capture-from.html
*/
#include <stdlib.h>
diff --git a/examples/sample-afl.c b/examples/sample-afl.c
index d3520c5f2..4b344350f 100644
--- a/examples/sample-afl.c
+++ b/examples/sample-afl.c
@@ -16,7 +16,7 @@ static void errordumper(GPLogLevel level, const char *domain, const char *str,
fprintf(stderr, "%s:%s\n", domain, str);
}
-static int
+static int
recursive_directory(Camera *camera, const char *folder, GPContext *context, int *foundfile) {
int i, ret;
CameraList *list;
diff --git a/examples/sample-capture.c b/examples/sample-capture.c
index 17d9ec6ec..7a779a17c 100644
--- a/examples/sample-capture.c
+++ b/examples/sample-capture.c
@@ -1,13 +1,13 @@
-/*
+/*
* This code released into the public domain 21 July 2008
- *
+ *
* This program does the equivalent of:
* gphoto2 --shell
* > set-config capture=1
* > capture-image-and-download
* compile with gcc -Wall -o canon-capture -lgphoto2 canon-capture.c
*
- * Taken from: http://credentiality2.blogspot.com/2008/07/linux-libgphoto2-image-capture-from.html
+ * Taken from: http://credentiality2.blogspot.com/2008/07/linux-libgphoto2-image-capture-from.html
*
* and condensed into simple capture sample
*/
diff --git a/examples/sample-owner.c b/examples/sample-owner.c
index 063caa991..46434daf5 100644
--- a/examples/sample-owner.c
+++ b/examples/sample-owner.c
@@ -47,7 +47,7 @@ int main(int argc, char **argv) {
ret = set_config_value_string (camera, "artist", argv[1], context);
if (ret < GP_OK) {
fprintf (stderr, "Failed to set camera owner to %s; %d\n", argv[1], ret);
- } else
+ } else
printf("New owner: %s\n", argv[1]);
}
out:
diff --git a/examples/sample-photobooth.c b/examples/sample-photobooth.c
index 1a69bef8f..58534fbc8 100644
--- a/examples/sample-photobooth.c
+++ b/examples/sample-photobooth.c
@@ -1,5 +1,5 @@
/* compile with gcc -Wall -o sample-photobooth -lgphoto2 sample-photobooth.c
- *
+ *
*/
#include <stdlib.h>
diff --git a/examples/sample-tether.c b/examples/sample-tether.c
index 92232066e..333eeede1 100644
--- a/examples/sample-tether.c
+++ b/examples/sample-tether.c
@@ -1,4 +1,4 @@
-/*
+/*
* This program does the equivalent of:
* gphoto2 --wait-event-and-download
*
diff --git a/examples/sample-trigger-capture.c b/examples/sample-trigger-capture.c
index b54ccf7d5..1433adce3 100644
--- a/examples/sample-trigger-capture.c
+++ b/examples/sample-trigger-capture.c
@@ -1,4 +1,4 @@
-/*
+/*
*/
#include <stdlib.h>
@@ -47,7 +47,7 @@ wait_event_and_download (Camera *camera, int waittime, GPContext *context) {
gettimeofday (&curtime, NULL);
timediff = ((curtime.tv_sec - start.tv_sec)*1000)+((curtime.tv_usec - start.tv_usec)/1000);
- if (timediff >= waittime)
+ if (timediff >= waittime)
break;
retval = gp_camera_wait_for_event(camera, waittime - timediff, &evtype, &data, context);
@@ -127,7 +127,7 @@ wait_event_and_download (Camera *camera, int waittime, GPContext *context) {
}
if (-1 == lseek(fd, 0, SEEK_SET))
perror("lseek");
- if (-1 == write (fd, buffer, size))
+ if (-1 == write (fd, buffer, size))
perror("write");
close (fd);
diff --git a/gphoto2/gphoto2-abilities-list.h b/gphoto2/gphoto2-abilities-list.h
index 024950fd1..58eb3d033 100644
--- a/gphoto2/gphoto2-abilities-list.h
+++ b/gphoto2/gphoto2-abilities-list.h
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -111,7 +111,7 @@ typedef enum {
#endif /* _GPHOTO2_INTERNAL_CODE */
-/**
+/**
* \brief Describes the properties of a specific camera.
*
* The internals of this structures are used extensively by the
@@ -142,7 +142,7 @@ typedef struct {
char id [1024]; /**< \brief (Internal) camera ID name */
GphotoDeviceType device_type; /**< \brief Device type. */
- /** Reserved space to use in the future w/out changing the
+ /** Reserved space to use in the future w/out changing the
* struct size */
int reserved2; /**< reserved space \internal */
int reserved3; /**< reserved space \internal */
diff --git a/gphoto2/gphoto2-camera.h b/gphoto2/gphoto2-camera.h
index 8f204745f..f9ee30911 100644
--- a/gphoto2/gphoto2-camera.h
+++ b/gphoto2/gphoto2-camera.h
@@ -11,10 +11,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -35,7 +35,7 @@ extern "C" {
*
* A Camera object represents a specific instance of a (physical of
* virtual) camera attached to the system.
- *
+ *
* The abilities of this type of camera are stored in a CameraAbility
* object.
*
@@ -58,7 +58,7 @@ typedef struct _Camera Camera;
extern "C" {
#endif /* __cplusplus */
-/**
+/**
* \brief CameraText structure used in various functions.
*
* A text structure containing translated text returned
@@ -69,7 +69,7 @@ typedef struct {
char text [32 * 1024]; /**< \brief Character string containing the translated text. */
} CameraText;
-/**
+/**
* \brief A structure created by the capture operation.
*
* A structure containing the folder and filename of an object
@@ -112,7 +112,7 @@ typedef enum {
/**
* \name Camera object member functions
*
- * These functions must be implemented by a camlib and the camlib's
+ * These functions must be implemented by a camlib and the camlib's
* camera_init() function will add them to a Camera object.
*
* @{
@@ -133,7 +133,7 @@ typedef enum {
* Implement this function if you need to any of this stuff, otherwise leave
* it out.
*
- * \returns a gphoto error code
+ * \returns a gphoto error code
*/
typedef int (*CameraExitFunc) (Camera *camera, GPContext *context);
@@ -172,7 +172,7 @@ typedef int (*CameraGetConfigFunc) (Camera *camera, CameraWidget **widget,
* frontend, which then renders it, allows user input and sends it back
* via the #CameraSetConfigFunc function to have the driver configure itself
* or the camera.
- *
+ *
* This specific function retrieves one specific named entry, and not the full
* tree to allow for querying specific settings faster.
*
@@ -196,7 +196,7 @@ typedef int (*CameraGetSingleConfigFunc) (Camera *camera, const char *name, Came
* frontend, which then renders it, allows user input and sends it back
* via the #CameraSetConfigFunc function to have the driver configure itself
* or the camera.
- *
+ *
* This specific function retrieves all the available configuration values in a flat list.
*
* This is different than the GetConfigFunc, which returns a configuration tree.
@@ -210,14 +210,14 @@ typedef int (*CameraListConfigFunc) (Camera *camera, CameraList *list, GPContext
/**
* \brief Set the configuration in the camera
*
- * \param camera the current camera
+ * \param camera the current camera
* \param widget the configuration widget tree that was changed
* \param context the active #GPContext
*
* This function is called in the driver after the configuration is set.
* It is called directly after setting the value and might called multiple
* times (or never) after just one #CameraGetConfigFunc.
- *
+ *
* \returns a gphoto error code
*/
typedef int (*CameraSetConfigFunc) (Camera *camera, CameraWidget *widget,
@@ -225,13 +225,13 @@ typedef int (*CameraSetConfigFunc) (Camera *camera, CameraWidget *widget,
/**
* \brief Set a single configuration variable in the camera
*
- * \param camera the current camera
+ * \param camera the current camera
* \param name the widget to set
* \param widget the configuration widget tree that was changed
* \param context the active #GPContext
*
* This function is called in the driver after the configuration value is set.
- *
+ *
* \returns a gphoto error code
*/
typedef int (*CameraSetSingleConfigFunc) (Camera *camera, const char *name, CameraWidget *widget,
@@ -263,8 +263,8 @@ typedef int (*CameraWaitForEvent) (Camera *camera, int timeout,
* be initialized before or reset the after each access from
* libgphoto2.
*
- * For example, you would probably set the speed to the highest one
- * right before downloading an image, and reset it to the default speed
+ * For example, you would probably set the speed to the highest one
+ * right before downloading an image, and reset it to the default speed
* afterwards so that other programs will not be affected by this speed
* change.
*/
@@ -340,7 +340,7 @@ struct _Camera {
int gp_camera_new (Camera **camera);
-/** \name Preparing initialization
+/** \name Preparing initialization
* @{
*/
int gp_camera_set_abilities (Camera *camera, CameraAbilities abilities);
@@ -365,19 +365,19 @@ int gp_camera_get_port_speed (Camera *camera);
/**@}*/
-/** \name Initialization
- * @{
+/** \name Initialization
+ * @{
*/
int gp_camera_autodetect (CameraList *list, GPContext *context);
int gp_camera_init (Camera *camera, GPContext *context);
int gp_camera_exit (Camera *camera, GPContext *context);
/**@}*/
-
-/** \name Operations on cameras
- * @{
+
+/** \name Operations on cameras
+ * @{
*/
int gp_camera_ref (Camera *camera);
int gp_camera_unref (Camera *camera);
@@ -414,12 +414,12 @@ int gp_camera_get_storageinfo (Camera *camera, CameraStorageInformation**,
/**@}*/
-/** \name Operations on folders
+/** \name Operations on folders
* @{
*/
-int gp_camera_folder_list_files (Camera *camera, const char *folder,
+int gp_camera_folder_list_files (Camera *camera, const char *folder,
CameraList *list, GPContext *context);
-int gp_camera_folder_list_folders (Camera *camera, const char *folder,
+int gp_camera_folder_list_folders (Camera *camera, const char *folder,
CameraList *list, GPContext *context);
int gp_camera_folder_delete_all (Camera *camera, const char *folder,
GPContext *context);
@@ -434,29 +434,29 @@ int gp_camera_folder_remove_dir (Camera *camera, const char *folder,
/**@}*/
-/** \name Operations on files
+/** \name Operations on files
* @{
*/
-int gp_camera_file_get_info (Camera *camera, const char *folder,
+int gp_camera_file_get_info (Camera *camera, const char *folder,
const char *file, CameraFileInfo *info,
GPContext *context);
-int gp_camera_file_set_info (Camera *camera, const char *folder,
+int gp_camera_file_set_info (Camera *camera, const char *folder,
const char *file, CameraFileInfo info,
GPContext *context);
-int gp_camera_file_get (Camera *camera, const char *folder,
+int gp_camera_file_get (Camera *camera, const char *folder,
const char *file, CameraFileType type,
CameraFile *camera_file, GPContext *context);
int gp_camera_file_read (Camera *camera, const char *folder, const char *file,
- CameraFileType type,
+ CameraFileType type,
uint64_t offset, char *buf, uint64_t *size,
GPContext *context);
-int gp_camera_file_delete (Camera *camera, const char *folder,
+int gp_camera_file_delete (Camera *camera, const char *folder,
const char *file, GPContext *context);
/**@}*/
/**
- * \name Some cameras need 'keep-alive-messages'.
+ * \name Some cameras need 'keep-alive-messages'.
* @{
*/
typedef int (* CameraTimeoutFunc) (Camera *camera,
diff --git a/gphoto2/gphoto2-context.h b/gphoto2/gphoto2-context.h
index 37fba15c1..3a3d13098 100644
--- a/gphoto2/gphoto2-context.h
+++ b/gphoto2/gphoto2-context.h
@@ -1,4 +1,4 @@
-/** \file
+/** \file
* \brief Context callback operation functions.
*
* \author Copyright 2001 Lutz Mueller <lutz@users.sourceforge.net>
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -34,7 +34,7 @@ extern "C" {
/**
* \brief The gphoto context structure.
*
- * This structure allows callback handling, passing error contexts back,
+ * This structure allows callback handling, passing error contexts back,
* progress handling and download cancellation and similar things.
* It is usually passed around the functions.
*/
diff --git a/gphoto2/gphoto2-file.h b/gphoto2/gphoto2-file.h
index 1fb50d7a9..5cf19c77a 100644
--- a/gphoto2/gphoto2-file.h
+++ b/gphoto2/gphoto2-file.h
@@ -11,10 +11,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
diff --git a/gphoto2/gphoto2-filesys.h b/gphoto2/gphoto2-filesys.h
index 828cd179d..d8bceaf12 100644
--- a/gphoto2/gphoto2-filesys.h
+++ b/gphoto2/gphoto2-filesys.h
@@ -15,10 +15,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -41,12 +41,12 @@
extern "C" {
#endif /* __cplusplus */
-/**
+/**
* \brief Bitmask on what fields are set in the CameraFileInfo structure.
*
* Bitmask to mark up which fields are set in the CameraFileInfo
* structure. The other fields might be uninitialized.
- * If you set information via gp_camera_file_set_info() you
+ * If you set information via gp_camera_file_set_info() you
* need to set those flags. If you retrieve information via
* gp_camera_file_get_info() you need to check those flags.
* They are separate for both "normal" and "preview" parts
@@ -132,7 +132,7 @@ typedef struct _CameraFileInfoAudio {
char type[64]; /**< \brief MIME type of the audio file. */
} CameraFileInfoAudio;
-/**
+/**
* \brief File information structure.
*
* Contains the normal, preview and audio file information structures
@@ -144,14 +144,14 @@ typedef struct _CameraFileInfo {
CameraFileInfoAudio audio;
} CameraFileInfo;
-/**
+/**
* \brief Storage information flags.
*
* Bitmask to specify which entries of the filesystem
* storage information is set.
*/
typedef enum {
- GP_STORAGEINFO_BASE = (1<<0), /**< \brief The base directory.
+ GP_STORAGEINFO_BASE = (1<<0), /**< \brief The base directory.
* Usually / if just 1 storage is attached.
*/
GP_STORAGEINFO_LABEL = (1<<1), /**< \brief Label of the filesystem.
@@ -168,7 +168,7 @@ typedef enum {
/**
* \brief Hardware storage types.
- *
+ *
* Type of hardware this storage is on. The types and values
* are the same as the PTP standard uses (PTP_ST_xxx).
*/
@@ -182,7 +182,7 @@ typedef enum {
/**
* \brief Storage access modes.
- *
+ *
* The modes we can access the storage with. Uses the same
* types and values as the PTP standard (PTP_AC_xxx).
*/
@@ -194,7 +194,7 @@ typedef enum {
/**
* \brief Filesystem hierarchy types.
- *
+ *
* The type of the filesystem hierarchy the devices uses.
* Same types and values as the PTP standard defines (PTP_FST_xxx).
*/
@@ -224,7 +224,7 @@ typedef struct _CameraStorageInformation {
uint64_t freeimages; /**< \brief Free space in images (guessed by camera). */
} CameraStorageInformation;
-/**
+/**
* \brief Filesystem structure, only exposed to camera drivers.
*
* Internal structure, contents not exposed to frontends. Camera
diff --git a/gphoto2/gphoto2-library.h b/gphoto2/gphoto2-library.h
index 5009238c8..b0f8c530f 100644
--- a/gphoto2/gphoto2-library.h
+++ b/gphoto2/gphoto2-library.h
@@ -1,6 +1,6 @@
/** \file
* \brief Camery driver header.
- *
+ *
* \author Copyright 2000 Scott Fritzinger
*
* \note
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -58,14 +58,14 @@ typedef int (* CameraLibraryAbilitiesFunc) (CameraAbilitiesList *list);
* \return a gphoto2 error code
*
* The camera driver will establish a first connection
- * to the camera and configure the camera variable (i.e. using
+ * to the camera and configure the camera variable (i.e. using
* #gp_filesystem_set_list_funcs or #gp_port_get_settings).
*
**/
typedef int (* CameraLibraryInitFunc) (Camera *camera, GPContext *context);
/*
- * If you want to write a camera library, you need to implement
+ * If you want to write a camera library, you need to implement
* the following three functions. Everything else should be declared
* as static.
*/
diff --git a/gphoto2/gphoto2-list.h b/gphoto2/gphoto2-list.h
index 7dc6f9506..70944d7ef 100644
--- a/gphoto2/gphoto2-list.h
+++ b/gphoto2/gphoto2-list.h
@@ -11,10 +11,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -30,13 +30,13 @@
extern "C" {
#endif /* __cplusplus */
-/**
+/**
* \brief A generic list
- *
+ *
* This structure provides a list with \a name:value pairs that is used in various
* parts of libgphoto2. Its details are internal, please use the
* gp_list_xxx accessor functions.
- *
+ *
* Usage pattern for CameraList for users external of
* libgphoto2, such as libgphoto2 frontends:
*
@@ -57,7 +57,7 @@ extern "C" {
* \code
* CameraList foo; // DO NOT DO THIS
* \endcode
- *
+ *
* Please do NOT directly access the structure members like this:
* \code
* list->entry[i].name // DO NOT DO THIS
diff --git a/gphoto2/gphoto2-result.h b/gphoto2/gphoto2-result.h
index 79b953849..87b8b4c7c 100644
--- a/gphoto2/gphoto2-result.h
+++ b/gphoto2/gphoto2-result.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -53,7 +53,7 @@ extern "C" {
* \brief Specified camera model was not found
*
* The specified model could not be found. This error is reported when
- * the user specified a model that does not seem to be supported by
+ * the user specified a model that does not seem to be supported by
* any driver.
**/
#define GP_ERROR_MODEL_NOT_FOUND -105
@@ -77,13 +77,13 @@ extern "C" {
/**
* \brief Specified directory already exists
*
- * The specified directory already exists. This error is reported for example
+ * The specified directory already exists. This error is reported for example
* when the user wants to create a directory that already exists.
**/
#define GP_ERROR_DIRECTORY_EXISTS -109
/**
- * \brief The camera is already busy
+ * \brief The camera is already busy
*
* Camera I/O or a command is in progress.
**/
@@ -91,7 +91,7 @@ extern "C" {
/**
* \brief Path is not absolute
- *
+ *
* The specified path is not absolute. This error is reported when the user
* specifies paths that are not absolute, i.e. paths like "path/to/directory".
* As a rule of thumb, in gphoto2, there is nothing like relative paths.
diff --git a/gphoto2/gphoto2-setting.h b/gphoto2/gphoto2-setting.h
index 15a74a878..697cea91e 100644
--- a/gphoto2/gphoto2-setting.h
+++ b/gphoto2/gphoto2-setting.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
diff --git a/gphoto2/gphoto2-version.h b/gphoto2/gphoto2-version.h
index 0de10a26a..a25fc094a 100644
--- a/gphoto2/gphoto2-version.h
+++ b/gphoto2/gphoto2-version.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
diff --git a/gphoto2/gphoto2-widget.h b/gphoto2/gphoto2-widget.h
index 126f7e251..d33437cbb 100644
--- a/gphoto2/gphoto2-widget.h
+++ b/gphoto2/gphoto2-widget.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -70,7 +70,7 @@ typedef enum { /* Value (get/set): */
*/
typedef int (* CameraWidgetCallback) (Camera *, CameraWidget *, GPContext *);
-int gp_widget_new (CameraWidgetType type, const char *label,
+int gp_widget_new (CameraWidgetType type, const char *label,
CameraWidget **widget);
int gp_widget_free (CameraWidget *widget);
int gp_widget_ref (CameraWidget *widget);
@@ -80,14 +80,14 @@ int gp_widget_append (CameraWidget *widget, CameraWidget *child);
int gp_widget_prepend (CameraWidget *widget, CameraWidget *child);
int gp_widget_count_children (CameraWidget *widget);
-int gp_widget_get_child (CameraWidget *widget, int child_number,
+int gp_widget_get_child (CameraWidget *widget, int child_number,
CameraWidget **child);
/* Retrieve Widgets */
int gp_widget_get_child_by_label (CameraWidget *widget,
const char *label,
CameraWidget **child);
-int gp_widget_get_child_by_id (CameraWidget *widget, int id,
+int gp_widget_get_child_by_id (CameraWidget *widget, int id,
CameraWidget **child);
int gp_widget_get_child_by_name (CameraWidget *widget,
const char *name,
@@ -110,14 +110,14 @@ int gp_widget_get_id (CameraWidget *widget, int *id);
int gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type);
int gp_widget_get_label (CameraWidget *widget, const char **label);
-int gp_widget_set_range (CameraWidget *range,
+int gp_widget_set_range (CameraWidget *range,
float low, float high, float increment);
-int gp_widget_get_range (CameraWidget *range,
+int gp_widget_get_range (CameraWidget *range,
float *min, float *max, float *increment);
int gp_widget_add_choice (CameraWidget *widget, const char *choice);
int gp_widget_count_choices (CameraWidget *widget);
-int gp_widget_get_choice (CameraWidget *widget, int choice_number,
+int gp_widget_get_choice (CameraWidget *widget, int choice_number,
const char **choice);
int gp_widget_changed (CameraWidget *widget);
diff --git a/gphoto2/gphoto2.h b/gphoto2/gphoto2.h
index ac95a835a..9bb6ba970 100644
--- a/gphoto2/gphoto2.h
+++ b/gphoto2/gphoto2.h
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
diff --git a/libgphoto2/ahd_bayer.c b/libgphoto2/ahd_bayer.c
index 98d44b68a..80117a133 100644
--- a/libgphoto2/ahd_bayer.c
+++ b/libgphoto2/ahd_bayer.c
@@ -1,22 +1,22 @@
/** \file ahd_bayer.c
- *
+ *
* \brief Adaptive Homogeneity-Directed Bayer array conversion routine.
*
* \author Copyright March 12, 2008 Theodore Kilgore <kilgota@auburn.edu>
*
* \par
* gp_ahd_interpolate() from Eero Salminen <esalmine@gmail.com>
- * and Theodore Kilgore. The work of Eero Salminen is for partial completion
- * of a Diploma in Information and Computer Science,
+ * and Theodore Kilgore. The work of Eero Salminen is for partial completion
+ * of a Diploma in Information and Computer Science,
* Helsinki University of Technology, Finland.
*
* \par
* The algorithm is based upon the paper
*
* \par
- * Adaptive Homogeneity-Directed Democsaicing Algorithm,
- * Keigo Hirakawa and Thomas W. Parks, presented in the
- * IEEE Transactions on Image Processing, vol. 14, no. 3, March 2005.
+ * Adaptive Homogeneity-Directed Democsaicing Algorithm,
+ * Keigo Hirakawa and Thomas W. Parks, presented in the
+ * IEEE Transactions on Image Processing, vol. 14, no. 3, March 2005.
*
* \par License
* This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
-
+
#include <stdio.h>
@@ -60,21 +60,21 @@
static
int dRGB(int i1, int i2, unsigned char *RGB);
static
-int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
+int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
int h, int y, int *pos_code);
static
-int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
+int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
unsigned char *image_v, int w, int h, int y, int *pos_code);
static
-int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
+int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
unsigned char * buffer_h, unsigned char *buffer_v, int w);
#define AD(x, y, w) ((y)*(w)*3+3*(x))
/**
- * \brief This function computes distance^2 between two sets of pixel data.
+ * \brief This function computes distance^2 between two sets of pixel data.
* \param i1 location of a pixel
* \param i2 location of another pixel
- * \param RGB some RGB data.
+ * \param RGB some RGB data.
*/
static
int dRGB(int i1, int i2, unsigned char *RGB) {
@@ -89,39 +89,39 @@ int dRGB(int i1, int i2, unsigned char *RGB) {
* \param image_h three-row window, horizontal interpolation of row 1 is done
* \param image_v three-row window, vertical interpolation of row 1 is done
* \param w width of image
- * \param h height of image.
+ * \param h height of image.
* \param y row number from image which is under construction
* \param pos_code position code related to Bayer tiling in use
*/
static
-int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
- int h, int y, int *pos_code)
+int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
+ int h, int y, int *pos_code)
{
int x, bayer;
int value,value2,div,color;
/*
- * pos_code[0] = red. green lrtb, blue diagonals
- * pos_code[1] = green. red lr, blue tb
- * pos_code[2] = green. blue lr, red tb
- * pos_code[3] = blue. green lrtb, red diagonals
+ * pos_code[0] = red. green lrtb, blue diagonals
+ * pos_code[1] = green. red lr, blue tb
+ * pos_code[2] = green. blue lr, red tb
+ * pos_code[3] = blue. green lrtb, red diagonals
*
* The Red channel reconstruction is R=G+L(Rs-Gs), in which
* G = interpolated & known Green
* Rs = known Red
* Gs = values of G at the positions of Rs
- * L()= should be a 2D lowpass filter, now we'll check
+ * L()= should be a 2D lowpass filter, now we'll check
* them from a 3x3 square
- * L-functions' convolution matrix is
+ * L-functions' convolution matrix is
* [1/4 1/2 1/4;1/2 1 1/2; 1/4 1/2 1/4]
- *
+ *
* The Blue channel reconstruction uses exactly the same methods.
*/
- for (x = 0; x < w; x++)
+ for (x = 0; x < w; x++)
{
bayer = (x&1?0:1) + (y&1?0:2);
for (color=0; color < 3; color+=2) {
- if ((color==RED && bayer == pos_code[3])
- || (color==BLUE
+ if ((color==RED && bayer == pos_code[3])
+ || (color==BLUE
&& bayer == pos_code[0])) {
value=value2=div=0;
if (x > 0 && y > 0) {
@@ -159,8 +159,8 @@ int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
image_v[AD(x,1,w)+color]=
CLAMP(image_v[AD(x,1,w)+GREEN]
+value2/div);
- } else if ((color==RED && bayer == pos_code[2])
- || (color==BLUE
+ } else if ((color==RED && bayer == pos_code[2])
+ || (color==BLUE
&& bayer == pos_code[1])) {
value=value2=div=0;
if (y > 0) {
@@ -185,8 +185,8 @@ int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
CLAMP(
image_v[AD(x,1,w)+GREEN]
+value2/div);
- } else if ((color==RED && bayer == pos_code[1])
- || (color==BLUE
+ } else if ((color==RED && bayer == pos_code[1])
+ || (color==BLUE
&& bayer == pos_code[2])) {
value=value2=div=0;
if (x > 0) {
@@ -224,19 +224,19 @@ int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
* \param image_h three-row window, horizontal interpolation of row 1 is done
* \param image_v three-row window, vertical interpolation of row 1 is done
* \param w width of image
- * \param h height of image.
+ * \param h height of image.
* \param y row number from image which is under construction
* \param pos_code position code related to Bayer tiling in use
*/
static
-int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
+int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
unsigned char *image_v, int w, int h, int y, int *pos_code)
{
int x, bayer;
int value,div;
/*
- * The horizontal green estimation on a red-green row is
+ * The horizontal green estimation on a red-green row is
* G(x) = (2*R(x)+2*G(x+1)+2*G(x-1)-R(x-2)-R(x+2))/4
* The estimation on a green-blue row works in the same
* way.
@@ -254,7 +254,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div+=2;
if (x < (w-1)) {
value += 2*image[AD(x+1,y,w)+GREEN];
- div+=2;
+ div+=2;
}
if (x < (w-2)) {
if (bayer==pos_code[0])
@@ -275,9 +275,9 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div--;
}
image_h[AD(x,1,w)+GREEN] = CLAMP(value / div);
- /* The method for vertical estimation is just like
- * what is done for horizontal estimation, with only
- * the obvious difference that it is done vertically.
+ /* The method for vertical estimation is just like
+ * what is done for horizontal estimation, with only
+ * the obvious difference that it is done vertically.
*/
div=value=0;
if (bayer==pos_code[0])
@@ -287,7 +287,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div+=2;
if (y < (h-1)) {
value += 2*image[AD(x,y+1,w)+GREEN];
- div+=2;
+ div+=2;
}
if (y < (h-2)) {
if (bayer==pos_code[0])
@@ -308,7 +308,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div--;
}
image_v[AD(x,1,w)+GREEN] = CLAMP(value / div);
-
+
}
}
return GP_OK;
@@ -324,7 +324,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
*/
static
-int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
+int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
unsigned char * buffer_h, unsigned char *buffer_v, int w)
{
int i,j;
@@ -336,23 +336,23 @@ int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
Usize_h=0;
Usize_v=0;
- /*
- * Data collected here for adaptive estimates. First we take
+ /*
+ * Data collected here for adaptive estimates. First we take
* at the given pixel vertical diffs if working in window_v;
* left and right diffs if working in window_h. We then choose
- * of these two diffs as a permissible epsilon-radius within
- * which to work. Checking within this radius, we will
- * compute scores for the various possibilities. The score
- * added in each step is either 1, if the directional change
- * is within the prescribed epsilon, or 0 if it is not.
+ * of these two diffs as a permissible epsilon-radius within
+ * which to work. Checking within this radius, we will
+ * compute scores for the various possibilities. The score
+ * added in each step is either 1, if the directional change
+ * is within the prescribed epsilon, or 0 if it is not.
*/
-
+
RGBeps=MIN(
MAX(dRGB(i,i-3,buffer_h),dRGB(i,i+3,buffer_h)),
MAX(dRGB(i,i-3*w,buffer_v),dRGB(i,i+3*w,buffer_v))
);
/*
- * The scores for the homogeneity mapping. These will be used
+ * The scores for the homogeneity mapping. These will be used
* in the choice algorithm to choose the best value.
*/
@@ -387,35 +387,35 @@ int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
* \param tile how the 2x2 bayer array is laid out
*
* This function interpolates a bayer array which has been pre-expanded
- * by gp_bayer_expand() to an RGB image. It applies the method of adaptive
- * homogeneity-directed demosaicing.
+ * by gp_bayer_expand() to an RGB image. It applies the method of adaptive
+ * homogeneity-directed demosaicing.
*
* \return a gphoto error code
*
* \par
- * In outline, the interpolation algorithm used here does the
+ * In outline, the interpolation algorithm used here does the
* following:
*
* \par
- * In principle, the first thing which is done is to split off from the
- * image two copies. In one of these, interpolation will be done in the
- * vertical direction only, and in the other copy only in the
- * horizontal direction. "Cross-color" data is used throughout, on the
- * principle that it can be used as a corrector for brightness even if it is
- * derived from the "wrong" color. Finally, at each pixel there is a choice
- * criterion to decide whether to use the result of the vertical
- * interpolation, the horizontal interpolation, or an average of the two.
+ * In principle, the first thing which is done is to split off from the
+ * image two copies. In one of these, interpolation will be done in the
+ * vertical direction only, and in the other copy only in the
+ * horizontal direction. "Cross-color" data is used throughout, on the
+ * principle that it can be used as a corrector for brightness even if it is
+ * derived from the "wrong" color. Finally, at each pixel there is a choice
+ * criterion to decide whether to use the result of the vertical
+ * interpolation, the horizontal interpolation, or an average of the two.
*
* \par
- * Memory use and speed are optimized by using two sliding windows, one
- * for the vertical interpolation and the other for the horizontal
- * interpolation instead of using two copies of the entire input image. The
+ * Memory use and speed are optimized by using two sliding windows, one
+ * for the vertical interpolation and the other for the horizontal
+ * interpolation instead of using two copies of the entire input image. The
* nterpolation and the choice algorithm are then implemented entirely within
* these windows, too. When this has been done, a completed row is written back
- * to the image. Then the windows are moved, and the process repeats.
+ * to the image. Then the windows are moved, and the process repeats.
*/
-int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
+int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
{
int i, j, k, x, y;
int p[4];
@@ -460,53 +460,53 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
break;
}
- /*
- * Once the algorithm is initialized and running, one cycle of the
+ /*
+ * Once the algorithm is initialized and running, one cycle of the
* algorithm can be described thus:
- *
+ *
* Step 1
- * Write from row y+3 of the image to row 5 in window_v and in
- * window_h.
+ * Write from row y+3 of the image to row 5 in window_v and in
+ * window_h.
*
* Step 2
* Interpolate missing green data on row 5 in each window. Data from
- * the image only is needed for this, not data from the windows.
+ * the image only is needed for this, not data from the windows.
*
* Step 3
- * Now interpolate the missing red or blue data on row 4 in both
- * windows. We need to do this inside the windows; what is required
- * is the real or interpolated green data from rows 3 and 5, and the
- * real data on rows 3 and 5 about the color being interpolated on
- * row 4, so all of this information is available in the two windows.
- * Note that for this operation we are interpolating the center row
- * of cur_window_v and cur_window_h.
- *
+ * Now interpolate the missing red or blue data on row 4 in both
+ * windows. We need to do this inside the windows; what is required
+ * is the real or interpolated green data from rows 3 and 5, and the
+ * real data on rows 3 and 5 about the color being interpolated on
+ * row 4, so all of this information is available in the two windows.
+ * Note that for this operation we are interpolating the center row
+ * of cur_window_v and cur_window_h.
+ *
* Step 4
* Now we have five completed rows in each window, 0 through 4 (rows
- * 0 - 3 having been done in previous cycles). Completed rows 0 - 4
- * are what is required in order to run the choice algorithm at
- * each pixel location across row 2, to decide whether to choose the
- * data for that pixel from window_v or from window_h. We run the
- * choice algorithm, sending the data from row 2 over to row y of the
- * image, pixel by pixel.
+ * 0 - 3 having been done in previous cycles). Completed rows 0 - 4
+ * are what is required in order to run the choice algorithm at
+ * each pixel location across row 2, to decide whether to choose the
+ * data for that pixel from window_v or from window_h. We run the
+ * choice algorithm, sending the data from row 2 over to row y of the
+ * image, pixel by pixel.
*
* Step 5
* Move the windows down (or the data in them up) by one row.
* Increment y, the row counter for the image. Go to Step 1.
- *
- * Initialization of the algorithm clearly requires some special
- * steps, which are described below as they occur.
+ *
+ * Initialization of the algorithm clearly requires some special
+ * steps, which are described below as they occur.
*/
- cur_window_h = window_h+9*w;
- cur_window_v = window_v+9*w;
+ cur_window_h = window_h+9*w;
+ cur_window_v = window_v+9*w;
/*
* Getting started. Copy row 0 from image to line 4 of windows
- * and row 1 from image to line 5 of windows.
+ * and row 1 from image to line 5 of windows.
*/
memcpy (window_h+12*w, image, 6*w);
memcpy (window_v+12*w, image, 6*w);
/*
- * Now do the green interpolation in row 4 of the windows, the
+ * Now do the green interpolation in row 4 of the windows, the
* "center" row of cur_window_v and _h, with the help of image row 0
* and image row 1.
*/
@@ -514,38 +514,38 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
/* this does the green interpolation in row 5 of the windows */
do_green_ctr_row(image, cur_window_h+3*w, cur_window_v+3*w, w, h, 1, p);
/*
- * we are now ready to do the rb interpolation on row 4 of the
- * windows, which relates to row 0 of the image.
- */
+ * we are now ready to do the rb interpolation on row 4 of the
+ * windows, which relates to row 0 of the image.
+ */
do_rb_ctr_row(cur_window_h, cur_window_v, w, h, 0, p);
/*
* Row row 4, which will be mapped to image row 0, is finished in both
- * windows. Row 5 has had only the green interpolation.
+ * windows. Row 5 has had only the green interpolation.
*/
memmove(window_h, window_h+3*w,15*w);
memmove(window_v, window_v+3*w,15*w);
memcpy (window_h+15*w, image+6*w, 3*w);
memcpy (window_v+15*w, image+6*w, 3*w);
/*
- * now we have shifted backwards and we have row 0 of the image in
+ * now we have shifted backwards and we have row 0 of the image in
* row 3 of the windows. Row 4 of the window contains row 1 of image
- * and needs the rb interpolation. We have copied row 2 of the image
- * into row 5 of the windows and need to do green interpolation.
+ * and needs the rb interpolation. We have copied row 2 of the image
+ * into row 5 of the windows and need to do green interpolation.
*/
do_green_ctr_row(image, cur_window_h+3*w, cur_window_v+3*w, w, h, 2, p);
do_rb_ctr_row(cur_window_h, cur_window_v, w, h, 1, p);
memmove (window_h, window_h+3*w, 15*w);
- memmove(window_v, window_v+3*w,15*w);
+ memmove(window_v, window_v+3*w,15*w);
/*
- * We have shifted one more time. Row 2 of the two windows is
- * the original row 0 of the image, now fully interpolated. Rows 3
- * and 4 of the windows contain the original rows 1 and 2 of the
- * image, also fully interpolated. They will be used while applying
+ * We have shifted one more time. Row 2 of the two windows is
+ * the original row 0 of the image, now fully interpolated. Rows 3
+ * and 4 of the windows contain the original rows 1 and 2 of the
+ * image, also fully interpolated. They will be used while applying
* the choice algorithm on row 2, in order to write it back to row
- * 0 of the image. The algorithm is now fully initialized. We enter
+ * 0 of the image. The algorithm is now fully initialized. We enter
* the loop which will complete the algorithm for the whole image.
*/
-
+
for (y = 0; y < h; y++) {
if(y<h-3) {
memcpy (window_v+15*w,image+3*y*w+9*w, 3*w);
@@ -554,16 +554,16 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
memset(window_v+15*w, 0, 3*w);
memset(window_h+15*w, 0, 3*w);
}
- if (y<h-3)
- do_green_ctr_row(image, cur_window_h+3*w,
+ if (y<h-3)
+ do_green_ctr_row(image, cur_window_h+3*w,
cur_window_v+3*w, w, h, y+3, p);
- if (y<h-2)
+ if (y<h-2)
do_rb_ctr_row(cur_window_h, cur_window_v, w, h, y+2, p);
/*
- * The next function writes row 2 of diffs, which is the set of
- * diff scores for row y+1 of the image, which is row 3 of our
+ * The next function writes row 2 of diffs, which is the set of
+ * diff scores for row y+1 of the image, which is row 3 of our
* windows. When starting with row 0 of the image, this is all
- * we need. As we continue, the results of this calculation
+ * we need. As we continue, the results of this calculation
* will also be rotated; in general we need the diffs for rows
* y-1, y, and y+1 in order to carry out the choice algorithm
* for writing row y.
@@ -572,15 +572,15 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
memset(homo_ch, 0, w);
memset(homo_cv, 0, w);
- /* The choice algorithm now will use the sum of the nine diff
- * scores computed at the pixel location and at its eight
- * nearest neighbors. The direction with highest score will
- * be used; if the scores are equal an average is used.
+ /* The choice algorithm now will use the sum of the nine diff
+ * scores computed at the pixel location and at its eight
+ * nearest neighbors. The direction with highest score will
+ * be used; if the scores are equal an average is used.
*/
for (x=0; x < w; x++) {
for (i=-1; i < 2;i++) {
for (k=0; k < 3;k++) {
- j=i+x+w*k;
+ j=i+x+w*k;
if ((j >= 0) && ( j < w*3)) {
homo_ch[x]+=homo_h[j];
homo_cv[x]+=homo_v[j];
@@ -629,10 +629,10 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
* 2x2 RGB pixel set out of this data.
*
* This function expands and interpolates the bayer array to 3 times larger
- * bitmap with RGB values interpolated. It does the same job as
+ * bitmap with RGB values interpolated. It does the same job as
* gp_bayer_decode() but it calls gp_ahd_interpolate() instead of calling
- * gp_bayer_interpolate(). Use this instead of gp_bayer_decode() if you
- * want to use or to test AHD interpolation in a camera library.
+ * gp_bayer_interpolate(). Use this instead of gp_bayer_decode() if you
+ * want to use or to test AHD interpolation in a camera library.
* \return a gphoto error code
*/
diff --git a/libgphoto2/bayer.c b/libgphoto2/bayer.c
index 48537c057..12da20fbc 100644
--- a/libgphoto2/bayer.c
+++ b/libgphoto2/bayer.c
@@ -68,7 +68,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
* This function expands the bayer array to 3 times larger bitmap with
* RGB values copied as-is. Pixels were no sensor was there are 0.
* The data is supposed to be processed further by for instance gp_bayer_interpolate().
- *
+ *
* \return a gphoto error code
*/
int
@@ -113,7 +113,7 @@ gp_bayer_expand (unsigned char *input, int w, int h, unsigned char *output,
bayer = (x&1?0:1) + (y&1?0:2);
colour = tile_colours[tile][bayer];
-
+
i = (y * w + x) * 3;
output[i+RED] = 0;
@@ -251,7 +251,7 @@ gp_bayer_interpolate (unsigned char *image, int w, int h, BayerTile tile)
}
/**
* \brief interpolate one pixel from a bayer 2x2 raster
- *
+ *
* For red and blue data, compare the four surrounding values. If three
* values are all one side of the mean value, the fourth value is ignored.
* This will sharpen boundaries. Treatment of green data looks for vertical and
@@ -272,7 +272,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
int i ;
x[0] = x0 ; x[1] = x1 ; x[2] = x2 ; x[3] = x3 ;
y[0] = y0 ; y[1] = y1 ; y[2] = y2 ; y[3] = y3 ;
-
+
/* special treatment for green */
counter = sum_of_values = 0 ;
if(colour == GREEN)
@@ -282,7 +282,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
* interpolation procedure. Therefore, we determine whether
* we might have such a line structure.
*/
-
+
for (i = 0 ; i < 4 ; i++)
{ if ((x[i] >= 0) && (x[i] < w) && (y[i] >= 0) && (y[i] < h))
{
@@ -295,7 +295,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
}
}
if(counter == 4)
- {
+ {
/* It is assumed that x0,y0 and x1,y1 are on a
* horizontal line and
* x2,y2 and x3,y3 are on a vertical line
@@ -321,7 +321,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
/* if we do not have four points then we proceed as we do for
* blue and red */
}
-
+
/* for blue and red */
counter = sum_of_values = 0 ;
for (i = 0 ; i < 4 ; i++)
@@ -364,7 +364,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
*
* This function expands and interpolates the bayer array to 3 times larger
* bitmap with RGB values interpolated.
- *
+ *
* \return a gphoto error code
*/
int
diff --git a/libgphoto2/bayer.h b/libgphoto2/bayer.h
index ad96e1b29..f406ea6a4 100644
--- a/libgphoto2/bayer.h
+++ b/libgphoto2/bayer.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -26,7 +26,7 @@
/**
* \brief how the bayer CCD array is laid out
- *
+ *
* This enumeration defines how the CCD bayer array is laid out.
*/
typedef enum {
@@ -47,9 +47,9 @@ int gp_bayer_decode (unsigned char *input, int w, int h, unsigned char *output,
int gp_bayer_interpolate (unsigned char *image, int w, int h, BayerTile tile);
/*
* The following two functions use an alternative procedure called Adaptive
- * Homogeneity-directed demosaicing instead of the standard bilinear
- * interpolation with basic edge-detection method used in the previous two
- * functions. To use or test this method of Bayer interpolation, just use
+ * Homogeneity-directed demosaicing instead of the standard bilinear
+ * interpolation with basic edge-detection method used in the previous two
+ * functions. To use or test this method of Bayer interpolation, just use
* gp_ahd_decode() in the same way and in the same place as gp_bayer_decode()
* is used.
*/
diff --git a/libgphoto2/exif.c b/libgphoto2/exif.c
index cd5795909..2297edab7 100644
--- a/libgphoto2/exif.c
+++ b/libgphoto2/exif.c
@@ -31,7 +31,7 @@
/*
* Gets the thumbnail of an EXIF image.
* The thumbnail size is provided
- *
+ *
* No longer provided, use libexif directly please.
*/
unsigned char *gpi_exif_get_thumbnail_and_size(void *exifdat, long *size) { return NULL; }
diff --git a/libgphoto2/exif.h b/libgphoto2/exif.h
index ac8587e75..9032f5201 100644
--- a/libgphoto2/exif.h
+++ b/libgphoto2/exif.h
@@ -10,7 +10,7 @@
*/
#ifndef _gphoto_exif_
-#define _gphoto_exif_
+#define _gphoto_exif_
/*
* Not used anymore, use libexif if necessary.
diff --git a/libgphoto2/gamma.c b/libgphoto2/gamma.c
index a3607f8c2..c4a970ffe 100644
--- a/libgphoto2/gamma.c
+++ b/libgphoto2/gamma.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -50,7 +50,7 @@ gp_gamma_correct_triple (unsigned char *table_red,
*
* Corrects size pixels within the table with a given Gamma
* correction table.
- *
+ *
* \param table the gamma correction table as generated by gp_gamma_fill_table()
* \param data the data do process, both input and output
* \param size in number of pixels (RGB byte pairs)
@@ -66,7 +66,7 @@ gp_gamma_correct_single (unsigned char *table, unsigned char *data,
/**
* \brief Initialize a Gamma conversion table
- *
+ *
* Initializes the gamma conversion table for later use by gp_gamma_correct_single().
* Requires a 256 byte array as table.
* \param table a 256 byte array of unsigned char
diff --git a/libgphoto2/gamma.h b/libgphoto2/gamma.h
index b03a97dd6..0d963cbf1 100644
--- a/libgphoto2/gamma.h
+++ b/libgphoto2/gamma.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -25,7 +25,7 @@
#define __GAMMA_H__
int gp_gamma_fill_table (unsigned char *table, double g);
-int gp_gamma_correct_single (unsigned char *table, unsigned char *data,
+int gp_gamma_correct_single (unsigned char *table, unsigned char *data,
unsigned int data_size);
#endif /* __GAMMA_H__ */
diff --git a/libgphoto2/gphoto2-abilities-list.c b/libgphoto2/gphoto2-abilities-list.c
index 67249a194..09364d56e 100644
--- a/libgphoto2/gphoto2-abilities-list.c
+++ b/libgphoto2/gphoto2-abilities-list.c
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -77,7 +77,7 @@ static int gp_abilities_list_sort (CameraAbilitiesList *);
* \param codeset New codeset for the messages. For instance "utf-8".
* \return old codeset as returned from bind_textdomain_codeset().
*
- * You would then call gp_abilities_list_load() in order to
+ * You would then call gp_abilities_list_load() in order to
* populate it.
*/
const char*
@@ -94,7 +94,7 @@ gp_message_codeset (const char *codeset)
* \param list CameraAbilitiesList object to initialize
* \return gphoto2 error code
*
- * You would then call gp_abilities_list_load() in order to
+ * You would then call gp_abilities_list_load() in order to
* populate it.
*/
int
@@ -235,7 +235,7 @@ gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir,
if (gp_abilities_list_lookup_id (list, text.text) >= 0) {
lt_dlclose (lh);
continue;
- }
+ }
/* camera_abilities */
ab = lt_dlsym (lh, "camera_abilities");
@@ -259,7 +259,7 @@ gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir,
}
/* do not free the library in valgrind mode */
-#if !defined(VALGRIND)
+#if !defined(VALGRIND)
lt_dlclose (lh);
#endif
@@ -277,7 +277,7 @@ gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir,
if (gp_context_cancel (context) == GP_CONTEXT_FEEDBACK_CANCEL) {
lt_dlexit ();
gp_list_free (flist);
- return (GP_ERROR_CANCEL);
+ return (GP_ERROR_CANCEL);
}
}
gp_context_progress_stop (context, p);
@@ -338,7 +338,7 @@ gp_abilities_list_detect_usb (CameraAbilitiesList *list,
list->abilities[i].model, v, p);
*ability = i;
} else if (res < 0 && res != GP_ERROR_IO_USB_FIND) {
- /* another error occurred.
+ /* another error occurred.
* perhaps we should better
* report this to the calling
* method?
@@ -363,7 +363,7 @@ gp_abilities_list_detect_usb (CameraAbilitiesList *list,
list->abilities[i].model, c, s, p);
*ability = i;
} else if (res < 0 && res != GP_ERROR_IO_USB_FIND) {
- /* another error occurred.
+ /* another error occurred.
* perhaps we should better
* report this to the calling
* method?
@@ -428,7 +428,7 @@ gp_abilities_list_detect (CameraAbilitiesList *list,
case GP_PORT_USB_SCSI:
case GP_PORT_USB_DISK_DIRECT: {
int ability;
-
+
res = gp_abilities_list_detect_usb (list, &ability, port);
if (res == GP_OK) {
gp_list_append(l,
@@ -442,7 +442,7 @@ gp_abilities_list_detect (CameraAbilitiesList *list,
case GP_PORT_DISK: {
char *s, path[1024];
struct stat stbuf;
-
+
s = strchr (xpath, ':');
if (!s)
break;
diff --git a/libgphoto2/gphoto2-camera.c b/libgphoto2/gphoto2-camera.c
index e190c3658..7c2ccbc7e 100644
--- a/libgphoto2/gphoto2-camera.c
+++ b/libgphoto2/gphoto2-camera.c
@@ -12,10 +12,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -107,8 +107,8 @@
* to a 'Reset' signal on the camera. I quote from the Digita 'Host
* Interface Specification' document:
*
- * "The Reset signal is a pulse on the Reset/Att line (which cooresponds
- * [sic] to pin 2 at the camera side) sent from the host computer to the
+ * "The Reset signal is a pulse on the Reset/Att line (which cooresponds
+ * [sic] to pin 2 at the camera side) sent from the host computer to the
* camera. This pulse must be at least 50us."
*/
@@ -254,9 +254,9 @@ struct _CameraPrivateCore {
* Closes a connection to the camera and therefore gives other application
* the possibility to access the camera, too.
*
- * It is recommended that you
+ * It is recommended that you
* call this function when you currently don't need the camera. The camera
- * will get reinitialized by gp_camera_init() automatically if you try to
+ * will get reinitialized by gp_camera_init() automatically if you try to
* access the camera again.
*
*/
@@ -268,7 +268,7 @@ gp_camera_exit (Camera *camera, GPContext *context)
GP_LOG_D ("Exiting camera ('%s')...", camera->pc->a.model);
/*
- * We have to postpone this operation if the camera is currently
+ * We have to postpone this operation if the camera is currently
* in use. gp_camera_exit will be called again if the
* camera->pc->used will drop to zero.
*/
@@ -350,7 +350,7 @@ error:
/**
- * \brief Sets the camera abilities.
+ * \brief Sets the camera abilities.
*
* @param camera a #Camera
* @param abilities the #CameraAbilities to be set
@@ -358,8 +358,8 @@ error:
*
* You need to call this function before calling #gp_camera_init the
* first time unless you want gphoto2 to autodetect cameras and choose
- * the first detected one. By setting the \c abilities, you
- * tell gphoto2 what model the \c camera is and what camera driver should
+ * the first detected one. By setting the \c abilities, you
+ * tell gphoto2 what model the \c camera is and what camera driver should
* be used for accessing the \c camera. You can get \c abilities by calling
* #gp_abilities_list_get_abilities.
*
@@ -385,7 +385,7 @@ gp_camera_set_abilities (Camera *camera, CameraAbilities abilities)
/**
- * Retrieve the \c abilities of the \c camera.
+ * Retrieve the \c abilities of the \c camera.
*
* @param camera a #Camera
* @param abilities
@@ -443,11 +443,11 @@ gp_camera_set_port_info (Camera *camera, GPPortInfo info)
* @param speed the speed
* @return a gphoto2 error code
*
- * This function is typically used prior first initialization
+ * This function is typically used prior first initialization
* using #gp_camera_init for debugging purposes. Normally, a camera driver
* will try to figure out the current speed of the camera and set the speed
- * to the optimal one automatically. Note that this function only works with
- * serial ports. In other words, you have to set the camera's port to a
+ * to the optimal one automatically. Note that this function only works with
+ * serial ports. In other words, you have to set the camera's port to a
* serial one (using #gp_camera_set_port_path or #gp_camera_set_port_name)
* prior calling this function.
*
@@ -480,7 +480,7 @@ gp_camera_set_port_speed (Camera *camera, int speed)
}
-/**
+/**
* Retrieve the current speed.
*
* @param camera a #Camera
@@ -520,7 +520,7 @@ gp_camera_ref (Camera *camera)
* @param camera a #Camera
* @return a gphoto2 error code
*
- * If the reference count reaches %0, the \c camera will be freed
+ * If the reference count reaches %0, the \c camera will be freed
* automatically.
*
*/
@@ -554,7 +554,7 @@ gp_camera_unref (Camera *camera)
* @param camera a #Camera
* @return a gphoto2 error code
*
- * \deprecated
+ * \deprecated
* This function should never be used. Please use #gp_camera_unref instead.
*
*/
@@ -593,7 +593,7 @@ gp_camera_free (Camera *camera)
free (camera->functions);
camera->functions = NULL;
}
-
+
free (camera);
return (GP_OK);
@@ -664,7 +664,7 @@ out:
}
/**
- * Initiate a connection to the \c camera.
+ * Initiate a connection to the \c camera.
*
* @param camera a #Camera
* @param context a #GPContext
@@ -691,7 +691,7 @@ gp_camera_init (Camera *camera, GPContext *context)
C_PARAMS (camera);
/*
- * Reset the exit_requested flag. If this flag is set,
+ * Reset the exit_requested flag. If this flag is set,
* gp_camera_exit will be called as soon as the camera is no
* longer in use (used flag).
*/
@@ -809,7 +809,7 @@ gp_camera_init (Camera *camera, GPContext *context)
lt_dlexit ();
camera->pc->lh = NULL;
gp_context_error (context, _("Camera driver '%s' is "
- "missing the 'camera_init' function."),
+ "missing the 'camera_init' function."),
camera->pc->a.library);
return (GP_ERROR_LIBRARY);
}
@@ -1094,7 +1094,7 @@ gp_camera_list_config (Camera *camera, CameraList *list, GPContext *context)
* @param context a #GPContext
* @return a gphoto2 error code
*
- * Typically, a \c window is retrieved using #gp_camera_get_config and passed
+ * Typically, a \c window is retrieved using #gp_camera_get_config and passed
* to this function in order to adjust the settings on the camera.
*
**/
@@ -1372,8 +1372,8 @@ gp_camera_trigger_capture (Camera *camera, GPContext *context)
}
/**
- * Captures a preview that won't be stored on the camera but returned in
- * supplied file.
+ * Captures a preview that won't be stored on the camera but returned in
+ * supplied file.
*
* @param camera a #Camera
* @param file a #CameraFile
@@ -1429,7 +1429,7 @@ gp_camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
* If an event is received then eventtype is set to the type of event, and
* eventdata is set to event specific data. See the CameraEventType enum
* to see which eventtypes match to which types of eventdata.
- *
+ *
* Note that this function will return one event after each other, you need
* to be able to call it multiple times, e.g. in a loop, when waiting for specific
* events.
@@ -1464,7 +1464,7 @@ gp_camera_wait_for_event (Camera *camera, int timeout,
*
**/
int
-gp_camera_folder_list_files (Camera *camera, const char *folder,
+gp_camera_folder_list_files (Camera *camera, const char *folder,
CameraList *list, GPContext *context)
{
GP_LOG_D ("Listing files in '%s'...", folder);
@@ -1492,7 +1492,7 @@ gp_camera_folder_list_files (Camera *camera, const char *folder,
*
**/
int
-gp_camera_folder_list_folders (Camera *camera, const char* folder,
+gp_camera_folder_list_folders (Camera *camera, const char* folder,
CameraList *list, GPContext *context)
{
GP_LOG_D ("Listing folders in '%s'...", folder);
@@ -1575,7 +1575,7 @@ gp_camera_folder_put_file (Camera *camera,
*
**/
int
-gp_camera_file_get_info (Camera *camera, const char *folder,
+gp_camera_file_get_info (Camera *camera, const char *folder,
const char *file, CameraFileInfo *info,
GPContext *context)
{
@@ -1641,7 +1641,7 @@ gp_camera_file_get_info (Camera *camera, const char *folder,
*
**/
int
-gp_camera_file_set_info (Camera *camera, const char *folder,
+gp_camera_file_set_info (Camera *camera, const char *folder,
const char *file, CameraFileInfo info,
GPContext *context)
{
@@ -1667,7 +1667,7 @@ gp_camera_file_set_info (Camera *camera, const char *folder,
* @return a gphoto2 error code
*
**/
-int
+int
gp_camera_file_get (Camera *camera, const char *folder, const char *file,
CameraFileType type, CameraFile *camera_file,
GPContext *context)
@@ -1688,7 +1688,7 @@ gp_camera_file_get (Camera *camera, const char *folder, const char *file,
CAMERA_UNUSED (camera, context);
return (GP_ERROR_FILE_NOT_FOUND);
}
-
+
CHECK_RESULT_OPEN_CLOSE (camera, gp_filesystem_get_file (camera->fs,
folder, file, type, camera_file, context), context);
@@ -1730,7 +1730,7 @@ gp_camera_file_read (Camera *camera, const char *folder, const char *file,
CAMERA_UNUSED (camera, context);
return (GP_ERROR_FILE_NOT_FOUND);
}
-
+
CHECK_RESULT_OPEN_CLOSE (camera, gp_filesystem_read_file (camera->fs,
folder, file, type, offset, buf, size, context), context);
@@ -1923,7 +1923,7 @@ gp_camera_start_timeout (Camera *camera, unsigned int timeout,
* Stop periodic calls to keepalive function.
*
* @param camera a #Camera
- * @param id the id of the background process previously returned by
+ * @param id the id of the background process previously returned by
* #gp_camera_start_timeout
*
* Call this function in the camera driver if you want to stop a periodic
diff --git a/libgphoto2/gphoto2-context.c b/libgphoto2/gphoto2-context.c
index bcd0785b1..2649311a8 100644
--- a/libgphoto2/gphoto2-context.c
+++ b/libgphoto2/gphoto2-context.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -106,7 +106,7 @@ gp_context_free (GPContext *context)
/**
* \brief Decrements reference count of a context.
- *
+ *
* Decrement the reference count of a context and free if it goes to 0.
*
* \param context The context to drop the reference count.
@@ -124,7 +124,7 @@ gp_context_unref (GPContext *context)
/**
* \brief Notify frontend of a brief idle time.
- *
+ *
* Tells the frontend that it can do other processing at this moment, like refresh
* the UI. Backends should call this function every time when an
* interruption of the transfer is possible.
@@ -143,7 +143,7 @@ gp_context_idle (GPContext *context)
/**
* \brief Start progress tracking.
- *
+ *
* This function starts up a new progress tracking for a specified context.
* Several nested progress reports can happen at once, depending on the backend.
*
@@ -246,7 +246,7 @@ gp_context_status (GPContext *context, const char *format, ...)
*
* This sends a message to the passed context, to be printed by
* it in some kind of way, but do no other action.
- *
+ *
* To be used by camera drivers.
*
* \param context A GPContext
diff --git a/libgphoto2/gphoto2-file.c b/libgphoto2/gphoto2-file.c
index af2372418..cdd671f3d 100644
--- a/libgphoto2/gphoto2-file.c
+++ b/libgphoto2/gphoto2-file.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -149,7 +149,7 @@ int gp_file_free (CameraFile *file)
C_PARAMS (file);
CHECK_RESULT (gp_file_clean (file));
-
+
if (file->accesstype == GP_FILE_ACCESSTYPE_FD)
close (file->fd);
@@ -169,7 +169,7 @@ gp_file_ref (CameraFile *file)
C_PARAMS (file);
file->ref_count += 1;
-
+
return (GP_OK);
}
@@ -184,7 +184,7 @@ int
gp_file_unref (CameraFile *file)
{
C_PARAMS (file);
-
+
file->ref_count -= 1;
if (file->ref_count == 0)
@@ -202,7 +202,7 @@ gp_file_unref (CameraFile *file)
*
**/
int
-gp_file_append (CameraFile *file, const char *data,
+gp_file_append (CameraFile *file, const char *data,
unsigned long int size)
{
C_PARAMS (file);
@@ -214,7 +214,7 @@ gp_file_append (CameraFile *file, const char *data,
file->size += size;
break;
case GP_FILE_ACCESSTYPE_FD: {
- unsigned long int curwritten = 0;
+ unsigned long int curwritten = 0;
while (curwritten < size) {
ssize_t res = write (file->fd, data+curwritten, size-curwritten);
if (res == -1) {
@@ -251,7 +251,7 @@ gp_file_append (CameraFile *file, const char *data,
* Internal.
**/
int
-gp_file_slurp (CameraFile *file, char *data,
+gp_file_slurp (CameraFile *file, char *data,
size_t size, size_t *readlen
) {
C_PARAMS (file);
@@ -265,7 +265,7 @@ gp_file_slurp (CameraFile *file, char *data,
if (readlen) *readlen = size;
break;
case GP_FILE_ACCESSTYPE_FD: {
- unsigned long int curread = 0;
+ unsigned long int curread = 0;
while (curread < size) {
ssize_t res = read (file->fd, data+curread, size-curread);
if (res == -1) {
@@ -388,8 +388,8 @@ gp_file_set_data_and_size (CameraFile *file, char *data,
*
* For regular CameraFiles, the pointer to data that is returned is
* still owned by libgphoto2 and its lifetime is the same as the #file.
- *
- * For filedescriptor or handler based CameraFile types, the returned
+ *
+ * For filedescriptor or handler based CameraFile types, the returned
* data pointer is owned by the caller and needs to be free()d to avoid
* memory leaks.
*
@@ -698,7 +698,7 @@ gp_file_open (CameraFile *file, const char *filename)
int
gp_file_clean (CameraFile *file)
{
- /*
+ /*
* Frees a CameraFile's components, not the CameraFile itself.
* This is used to prep a CameraFile struct to be filled.
*/
@@ -1115,7 +1115,7 @@ gp_file_adjust_name_for_mime_type (CameraFile *file)
break;
}
GP_LOG_D ("Name adjusted to '%s'.", file->name);
-
+
return (GP_OK);
}
diff --git a/libgphoto2/gphoto2-filesys.c b/libgphoto2/gphoto2-filesys.c
index 4afbf1613..7f4314093 100644
--- a/libgphoto2/gphoto2-filesys.c
+++ b/libgphoto2/gphoto2-filesys.c
@@ -390,7 +390,7 @@ lookup_folder (
char *copy = strdup (foldername);
int ret;
/*
- * The parent folder is dirty. List the folders in the parent
+ * The parent folder is dirty. List the folders in the parent
* folder to make it clean.
*/
/* the character _before_ curpt is a /, overwrite it temporary with \0 */
@@ -788,7 +788,7 @@ recursive_fs_dump (CameraFilesystemFolder *folder, int depth) {
GP_LOG_D ("%*s %s", depth, " ", xfile->name);
xfile = xfile->next;
}
-
+
f = folder->folders;
while (f) {
recursive_fs_dump (f, depth+4);
@@ -1239,7 +1239,7 @@ gp_filesystem_remove_dir (CameraFilesystem *fs, const char *folder,
CameraList *list;
int ret;
/*
- * The owning folder is dirty. List the folders in it
+ * The owning folder is dirty. List the folders in it
* to make it clean.
*/
GP_LOG_D ("Folder %s is dirty. "
@@ -1750,18 +1750,18 @@ gp_filesystem_get_file (CameraFilesystem *fs, const char *folder,
* \param type the type of the file
* \param offset the offset where the data starts
* \param buf the targetbuffer where the data will be put
- * \param size the size to read and that was read into the buffer
+ * \param size the size to read and that was read into the buffer
* \param context a #GPContext
*
* Downloads the file called filename from the folder using the
* read_file_func if such a function has been previously supplied. If the
* file has been previously downloaded, the file is retrieved from cache.
- *
+ *
* The file is read partially into the passed buffer. The read starts
* at offset on the device and goes for at most size bytes.
* Reading over the end of the file might give errors, so get the maximum
* file size via an info function before.
- *
+ *
* \return a gphoto2 error code.
**/
int
diff --git a/libgphoto2/gphoto2-library.c b/libgphoto2/gphoto2-library.c
index 4e51412a8..b04a4d845 100644
--- a/libgphoto2/gphoto2-library.c
+++ b/libgphoto2/gphoto2-library.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -29,7 +29,7 @@
* \param id a #CameraText that receives the id string
*
* This function should write a unique id into id and return #GP_OK. That is,
- * choose a unique id, use strncpy in order to copy it into the id, and
+ * choose a unique id, use strncpy in order to copy it into the id, and
* return #GP_OK. The driver name should suffice.
*
* \returns a gphoto2 error code
@@ -45,7 +45,7 @@ camera_id (CameraText *id)
* \brief Get a list of abilities of all supported cameras
* \param list a #CameraAbilitiesList
*
- * This function should use #gp_abilities_list_append as many times as the
+ * This function should use #gp_abilities_list_append as many times as the
* number of models the camera driver supports. That is, fill out (in a loop)
* the #CameraAbilities for each model and append each of those to the
* supplied list using gp_abilities_list_append(). Then, return #GP_OK.
@@ -66,7 +66,7 @@ camera_abilities (CameraAbilitiesList *list)
* This is the most interesting function in your library. Here, you tell
* gphoto2 what operations your camera supports and you try to connect
* to the camera. That is, access camera->functions directly and set them
- * to your implementation (if you have any). Then, tell the #CameraFilesystem
+ * to your implementation (if you have any). Then, tell the #CameraFilesystem
* (available in #camera->fs) how to retrieve lists
* (gp_filesystem_set_list_funcs()), how to retrieve or set file information
* (gp_filesystem_set_info_funcs()), how to get or delete files
diff --git a/libgphoto2/gphoto2-list.c b/libgphoto2/gphoto2-list.c
index dc12ad4c2..d5faff858 100644
--- a/libgphoto2/gphoto2-list.c
+++ b/libgphoto2/gphoto2-list.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -117,7 +117,7 @@ gp_list_unref (CameraList *list)
*
**/
int
-gp_list_free (CameraList *list)
+gp_list_free (CameraList *list)
{
int i;
C_PARAMS (list && list->ref_count);
@@ -220,7 +220,7 @@ gp_list_sort (CameraList *list)
/**
* Counts the entries in the \c list.
- *
+ *
* \param list a #CameraList
* \return a gphoto2 error code
*
diff --git a/libgphoto2/gphoto2-result.c b/libgphoto2/gphoto2-result.c
index f62a83c2f..0f37bcefd 100644
--- a/libgphoto2/gphoto2-result.c
+++ b/libgphoto2/gphoto2-result.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -63,7 +63,7 @@ static struct {
* \brief Translate a gphoto error code into a localized string
* \param result a gphoto2 error code
*
- * Translates a gphoto2 error code into a human readable string. If the
+ * Translates a gphoto2 error code into a human readable string. If the
* error occurred in combination with a camera,
* gp_camera_get_result_as_string() should be used instead.
*
@@ -80,7 +80,7 @@ gp_result_as_string (int result)
/* Camlib error? */
if (result <= -1000)
- return (N_("Unknown camera library error"));
+ return (N_("Unknown camera library error"));
for (i = 0; result_descriptions[i].description; i++)
if (result_descriptions[i].result == result)
diff --git a/libgphoto2/gphoto2-setting.c b/libgphoto2/gphoto2-setting.c
index 7410938eb..cfe2438be 100644
--- a/libgphoto2/gphoto2-setting.c
+++ b/libgphoto2/gphoto2-setting.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
diff --git a/libgphoto2/gphoto2-version.c b/libgphoto2/gphoto2-version.c
index 6cf16254c..a872e7c03 100644
--- a/libgphoto2/gphoto2-version.c
+++ b/libgphoto2/gphoto2-version.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
diff --git a/libgphoto2/gphoto2-widget.c b/libgphoto2/gphoto2-widget.c
index af0acccca..1a7f57e56 100644
--- a/libgphoto2/gphoto2-widget.c
+++ b/libgphoto2/gphoto2-widget.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -53,8 +53,8 @@ struct _CameraWidget {
int choice_count;
/* For Range */
- float min;
- float max;
+ float min;
+ float max;
float increment;
/* Child info */
@@ -85,13 +85,13 @@ struct _CameraWidget {
*
* @param type the type
* @param label the label
- * @param widget
+ * @param widget
* @return a gphoto2 error code.
- *
+ *
**/
int
-gp_widget_new (CameraWidgetType type, const char *label,
- CameraWidget **widget)
+gp_widget_new (CameraWidgetType type, const char *label,
+ CameraWidget **widget)
{
static int i = 0;
@@ -101,7 +101,7 @@ gp_widget_new (CameraWidgetType type, const char *label,
(*widget)->type = type;
strcpy ((*widget)->label, label);
-
+
/* set the value to nothing */
(*widget)->value_int = 0;
(*widget)->value_float = 0.0;
@@ -126,7 +126,7 @@ gp_widget_new (CameraWidgetType type, const char *label,
*
* @param widget the #CameraWidget to be freed
* @return a gphoto2 error code.
- *
+ *
**/
int
gp_widget_free (CameraWidget *widget)
@@ -157,7 +157,7 @@ gp_widget_free (CameraWidget *widget)
*
**/
int
-gp_widget_ref (CameraWidget *widget)
+gp_widget_ref (CameraWidget *widget)
{
C_PARAMS (widget);
@@ -174,7 +174,7 @@ gp_widget_ref (CameraWidget *widget)
*
**/
int
-gp_widget_unref (CameraWidget *widget)
+gp_widget_unref (CameraWidget *widget)
{
C_PARAMS (widget);
@@ -261,7 +261,7 @@ gp_widget_set_name (CameraWidget *widget, const char *name)
* \brief Retrieves the unique id of the #CameraWidget
*
* @param widget a #CameraWidget
- * @param id
+ * @param id
* @return a gphoto2 error code.
*
**/
@@ -281,7 +281,7 @@ gp_widget_get_id (CameraWidget *widget, int *id)
* @param changed a boolean whether we changed or not
* @return a gphoto2 error code
*
- * Sets the changed of the CameraWidget depending on
+ * Sets the changed of the CameraWidget depending on
* the changed parameter.
*
**/
@@ -301,7 +301,7 @@ gp_widget_set_changed (CameraWidget *widget, int changed)
* @param changed a boolean whether we are readonly or not
* @return a gphoto2 error code
*
- * Sets the readonly of the CameraWidget depending on
+ * Sets the readonly of the CameraWidget depending on
* the changed parameter.
*
* Only useful when called from the camera driver.
@@ -324,7 +324,7 @@ gp_widget_set_readonly (CameraWidget *widget, int readonly)
*
**/
int
-gp_widget_get_readonly (CameraWidget *widget, int *readonly)
+gp_widget_get_readonly (CameraWidget *widget, int *readonly)
{
C_PARAMS (widget && readonly);
@@ -341,7 +341,7 @@ gp_widget_get_readonly (CameraWidget *widget, int *readonly)
*
**/
int
-gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type)
+gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type)
{
C_PARAMS (widget && type);
@@ -358,7 +358,7 @@ gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type)
*
**/
int
-gp_widget_get_label (CameraWidget *widget, const char **label)
+gp_widget_get_label (CameraWidget *widget, const char **label)
{
C_PARAMS (widget && label);
@@ -370,7 +370,7 @@ gp_widget_get_label (CameraWidget *widget, const char **label)
* \brief Sets the value of the widget
*
* @param widget a #CameraWidget
- * @param value
+ * @param value
* @return a gphoto2 error code.
*
* Please pass
@@ -381,7 +381,7 @@ gp_widget_get_label (CameraWidget *widget, const char **label)
*
**/
int
-gp_widget_set_value (CameraWidget *widget, const void *value)
+gp_widget_set_value (CameraWidget *widget, const void *value)
{
C_PARAMS (widget && value);
@@ -431,7 +431,7 @@ gp_widget_set_value (CameraWidget *widget, const void *value)
*
**/
int
-gp_widget_get_value (CameraWidget *widget, void *value)
+gp_widget_get_value (CameraWidget *widget, void *value)
{
C_PARAMS (widget && value);
@@ -467,7 +467,7 @@ gp_widget_get_value (CameraWidget *widget, void *value)
*
**/
int
-gp_widget_append (CameraWidget *widget, CameraWidget *child)
+gp_widget_append (CameraWidget *widget, CameraWidget *child)
{
C_PARAMS (widget && child);
@@ -493,7 +493,7 @@ gp_widget_append (CameraWidget *widget, CameraWidget *child)
*
**/
int
-gp_widget_prepend (CameraWidget *widget, CameraWidget *child)
+gp_widget_prepend (CameraWidget *widget, CameraWidget *child)
{
int x;
@@ -526,7 +526,7 @@ gp_widget_prepend (CameraWidget *widget, CameraWidget *child)
*
**/
int
-gp_widget_count_children (CameraWidget *widget)
+gp_widget_count_children (CameraWidget *widget)
{
C_PARAMS (widget);
@@ -543,8 +543,8 @@ gp_widget_count_children (CameraWidget *widget)
*
**/
int
-gp_widget_get_child (CameraWidget *widget, int child_number,
- CameraWidget **child)
+gp_widget_get_child (CameraWidget *widget, int child_number,
+ CameraWidget **child)
{
C_PARAMS (widget && child);
C_PARAMS (child_number < widget->children_count);
@@ -563,7 +563,7 @@ gp_widget_get_child (CameraWidget *widget, int child_number,
*
**/
int
-gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
+gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
CameraWidget **child)
{
int x;
@@ -578,8 +578,8 @@ gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
for (x = 0; x < widget->children_count; x++) {
int result;
CameraWidget *child_rec;
-
- result = gp_widget_get_child_by_label (widget->children[x],
+
+ result = gp_widget_get_child_by_label (widget->children[x],
label, &child_rec);
if (result == GP_OK) {
*child = child_rec;
@@ -600,7 +600,7 @@ gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
*
**/
int
-gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child)
+gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child)
{
int x;
@@ -610,12 +610,12 @@ gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child)
*child = widget;
return (GP_OK);
}
-
+
for (x = 0; x < widget->children_count; x++) {
int result;
CameraWidget *child_rec;
-
- result = gp_widget_get_child_by_id (widget->children[x], id,
+
+ result = gp_widget_get_child_by_id (widget->children[x], id,
&child_rec);
if (result == GP_OK) {
*child = child_rec;
@@ -646,11 +646,11 @@ gp_widget_get_child_by_name (CameraWidget *widget, const char *name,
*child = widget;
return (GP_OK);
}
-
+
for (x = 0; x < widget->children_count; x++) {
int result;
CameraWidget *child_rec;
-
+
result = gp_widget_get_child_by_name (widget->children[x], name,
&child_rec);
if (result == GP_OK) {
@@ -689,11 +689,11 @@ gp_widget_get_parent (CameraWidget *widget, CameraWidget **parent)
*
**/
int
-gp_widget_get_root (CameraWidget *widget, CameraWidget **root)
+gp_widget_get_root (CameraWidget *widget, CameraWidget **root)
{
C_PARAMS (widget && root);
- if (widget->parent)
+ if (widget->parent)
return (gp_widget_get_root (widget->parent, root));
else {
*root = widget;
@@ -735,8 +735,8 @@ gp_widget_set_range (CameraWidget *range, float min, float max, float increment)
*
**/
int
-gp_widget_get_range (CameraWidget *range, float *min, float *max,
- float *increment)
+gp_widget_get_range (CameraWidget *range, float *min, float *max,
+ float *increment)
{
C_PARAMS (range && min && max && increment);
C_PARAMS (range->type == GP_WIDGET_RANGE);
@@ -757,7 +757,7 @@ gp_widget_get_range (CameraWidget *range, float *min, float *max,
*
**/
int
-gp_widget_add_choice (CameraWidget *widget, const char *choice)
+gp_widget_add_choice (CameraWidget *widget, const char *choice)
{
C_PARAMS (widget && choice);
C_PARAMS ((widget->type == GP_WIDGET_RADIO) ||
@@ -774,10 +774,10 @@ gp_widget_add_choice (CameraWidget *widget, const char *choice)
*
* @param widget a #CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU
* @return a gphoto2 error code or number of choices.
- *
+ *
**/
int
-gp_widget_count_choices (CameraWidget *widget)
+gp_widget_count_choices (CameraWidget *widget)
{
C_PARAMS (widget);
C_PARAMS ((widget->type == GP_WIDGET_RADIO) ||
@@ -796,8 +796,8 @@ gp_widget_count_choices (CameraWidget *widget)
*
**/
int
-gp_widget_get_choice (CameraWidget *widget, int choice_number,
- const char **choice)
+gp_widget_get_choice (CameraWidget *widget, int choice_number,
+ const char **choice)
{
C_PARAMS (widget && choice);
C_PARAMS ((widget->type == GP_WIDGET_RADIO) ||
@@ -820,7 +820,7 @@ gp_widget_get_choice (CameraWidget *widget, int choice_number,
*
**/
int
-gp_widget_changed (CameraWidget *widget)
+gp_widget_changed (CameraWidget *widget)
{
C_PARAMS (widget);
diff --git a/libgphoto2/jpeg.h b/libgphoto2/jpeg.h
index cedff4378..71355e190 100644
--- a/libgphoto2/jpeg.h
+++ b/libgphoto2/jpeg.h
@@ -1,5 +1,5 @@
/** \file
- *
+ *
* \author This code was written by Nathan Stenzel for gphoto
*
* \note
diff --git a/libgphoto2_port/disk/disk.c b/libgphoto2_port/disk/disk.c
index a35c66f31..dcec24a14 100644
--- a/libgphoto2_port/disk/disk.c
+++ b/libgphoto2_port/disk/disk.c
@@ -10,10 +10,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -152,7 +152,7 @@ gp_port_library_list (GPPortInfoList *list)
gp_port_info_set_type (info, GP_PORT_DISK);
gp_port_info_set_name (info, s);
free (s);
-
+
s = malloc (strlen("disk:")+strlen(mntent->mnt_dir)+1);
sprintf (s, "disk:%s", mntent->mnt_dir);
gp_port_info_set_path (info, s);
@@ -229,7 +229,7 @@ gp_port_library_list (GPPortInfoList *list)
sprintf (s, _("Media '%s'"), mntent->mnt_fsname);
gp_port_info_set_name (info, s);
free (s);
-
+
s = malloc (strlen("disk:")+strlen(mntent->mnt_dir)+1);
sprintf (s, "disk:%s", mntent->mnt_dir);
gp_port_info_set_path (info, s);
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
index fcb840b68..e8c3b209a 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-info-list.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -31,7 +31,7 @@
* The enum is providing bitmasks, but most code uses it as
* just the one specific values.
*/
-typedef enum {
+typedef enum {
GP_PORT_NONE = 0, /**< \brief No specific type associated. */
GP_PORT_SERIAL = 1 << 0, /**< \brief Serial port. */
GP_PORT_USB = 1 << 2, /**< \brief USB port. */
@@ -44,7 +44,7 @@ typedef enum {
/**
* \brief Information about the current port.
- *
+ *
* Specific information about the current port. Usually taken from the
* "--port=XXXX" setting from the frontend.
*
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-library.h b/libgphoto2_port/gphoto2/gphoto2-port-library.h
index 1193f22da..2a9fd8839 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-library.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-library.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -29,7 +29,7 @@
/**
* \brief The port operations
- *
+ *
* These operations are to be implemented and set by the port library,
* which drives the lowlevel protocol (serial, usb, etc.).
*
@@ -63,13 +63,13 @@ typedef struct _GPPortOperations {
char *bytes, int size);
int (*msg_read) (GPPort * dev, int request, int value, int index,
char *bytes, int size);
- int (*msg_interface_write) (GPPort * dev, int request,
+ int (*msg_interface_write) (GPPort * dev, int request,
int value, int index, char *bytes, int size);
- int (*msg_interface_read) (GPPort * dev, int request,
+ int (*msg_interface_read) (GPPort * dev, int request,
int value, int index, char *bytes, int size);
- int (*msg_class_write) (GPPort * dev, int request,
+ int (*msg_class_write) (GPPort * dev, int request,
int value, int index, char *bytes, int size);
- int (*msg_class_read) (GPPort * dev, int request,
+ int (*msg_class_read) (GPPort * dev, int request,
int value, int index, char *bytes, int size);
/* For USB disk direct IO devices */
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-log.h b/libgphoto2_port/gphoto2/gphoto2-port-log.h
index 3d35d5938..b4737577b 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-log.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-log.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -36,10 +36,10 @@ typedef enum {
/**
* GP_LOG_ALL:
- *
- * Used by frontends if they want to be sure their
- * callback function receives all messages. Defined
- * as the highest debug level. Can make frontend code
+ *
+ * Used by frontends if they want to be sure their
+ * callback function receives all messages. Defined
+ * as the highest debug level. Can make frontend code
* more understandable and extension of log levels
* easier.
**/
@@ -47,9 +47,9 @@ typedef enum {
/**
* \brief Logging function hook
- *
+ *
* This is the function frontends can use to receive logging information
- * from the libgphoto2 framework. It is set using gp_log_add_func() and
+ * from the libgphoto2 framework. It is set using gp_log_add_func() and
* removed using gp_log_remove_func() and will then receive the logging
* messages of the level specified.
*
@@ -133,7 +133,7 @@ __attribute__((__format__(printf,4,5)))
# ifdef __GNUC__
# warning Disabling GP_DEBUG because variadic macros are not allowed
# endif
-#define GP_DEBUG (void)
+#define GP_DEBUG (void)
#define GP_LOG_D(...) /* no-op */
#define GP_LOG_E(...) /* no-op */
#define GP_LOG_DATA(DATA, SIZE, ...) /* no-op */
@@ -181,8 +181,8 @@ __attribute__((__format__(printf,4,5)))
typedef void (*string_item_func) (const char *str, void *data);
- const char *
- gpi_enum_to_string(const unsigned int _enum,
+ const char *
+ gpi_enum_to_string(const unsigned int _enum,
const StringFlagItem *map);
int
@@ -190,22 +190,22 @@ __attribute__((__format__(printf,4,5)))
unsigned int *result,
const StringFlagItem *map);
- void
- gpi_flags_to_string_list(const unsigned int flags,
+ void
+ gpi_flags_to_string_list(const unsigned int flags,
const StringFlagItem *map,
string_item_func func, void *data);
-
- int
- gpi_string_or_to_flags(const char *str,
+
+ int
+ gpi_string_or_to_flags(const char *str,
unsigned int *flags,
const StringFlagItem *map);
- unsigned int
- gpi_string_to_flag(const char *str,
+ unsigned int
+ gpi_string_to_flag(const char *str,
const StringFlagItem *map);
- unsigned int
- gpi_string_list_to_flags(const char *str[],
+ unsigned int
+ gpi_string_list_to_flags(const char *str[],
const StringFlagItem *map);
/* Allocates a sufficiently large buffer and interpolates the format
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-portability.h b/libgphoto2_port/gphoto2/gphoto2-port-portability.h
index 3d06efb54..1a8cdc17d 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-portability.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-portability.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -171,7 +171,7 @@ typedef struct {
* End OS/2 definitions
************************************************************************/
-#else
+#else
/************************************************************************
* Begin POSIX/XOPEN definitions
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-result.h b/libgphoto2_port/gphoto2/gphoto2-port-result.h
index 021460fd5..4fefa7a31 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-result.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-result.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -24,7 +24,7 @@
/* Return values. gphoto2-port should only return values from 0 to -99 */
/**
* \brief Everything is OK
- *
+ *
* Note that this is also the value 0, and every error is negative (lower).
*/
#define GP_OK 0
diff --git a/libgphoto2_port/gphoto2/gphoto2-port-version.h b/libgphoto2_port/gphoto2/gphoto2-port-version.h
index 251604080..761f56208 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port-version.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port-version.h
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/libgphoto2_port/gphoto2/gphoto2-port.h b/libgphoto2_port/gphoto2/gphoto2-port.h
index d1336cc3e..3fe6b2fee 100644
--- a/libgphoto2_port/gphoto2/gphoto2-port.h
+++ b/libgphoto2_port/gphoto2/gphoto2-port.h
@@ -1,4 +1,4 @@
-/** \file
+/** \file
*
* \author Copyright 2001 Lutz Mueller <lutz@users.sf.net>
*
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -47,7 +47,7 @@ extern "C" {
/**
* \brief Serial parity
- *
+ *
* Parity of the serial port.
*/
typedef enum _GPPortSerialParity
@@ -58,7 +58,7 @@ typedef enum _GPPortSerialParity
} GPPortSerialParity;
/** \brief Maximum length of receive buffer */
-#define GP_PORT_MAX_BUF_LEN 4096
+#define GP_PORT_MAX_BUF_LEN 4096
/**
* \brief Port settings for serial ports.
@@ -67,7 +67,7 @@ typedef struct _GPPortSettingsSerial {
char port[128]; /**< The portname (/dev/ttyX)*/
int speed; /**< The baudrate of the device. */
int bits; /**< How many bits data. */
- GPPortSerialParity parity; /**< parity data, see GP_PORT_SERIAL_PARITY_
+ GPPortSerialParity parity; /**< parity data, see GP_PORT_SERIAL_PARITY_
defines */
int stopbits; /**< How many stop bits are used. */
} GPPortSettingsSerial;
@@ -86,7 +86,7 @@ typedef struct _GPPortSettingsUSB {
int maxpacketsize; /**< \brief Maximum USB packetsize of the IN endpoint. (r/o) */
/* must be last to avoid binary incompatibility.
- * luckily we just need to make sure this struct does not
+ * luckily we just need to make sure this struct does not
* get larger than _GPPortSettingsSerial. */
char port[64]; /**< \brief USB Portname. Specific to lowlevel USB. */
} GPPortSettingsUSB;
@@ -177,7 +177,7 @@ int gp_port_get_settings (GPPort *port, GPPortSettings *settings);
/**
* \brief Serial pins.
- *
+ *
* A number of serial pins to trigger and pull. This is necessary
* for some devices that have more than just the regular 3 or 4 wires.
*/
@@ -192,7 +192,7 @@ typedef enum _GPPin {
/**
* \brief Level to pull specific lines.
- *
+ *
* The level on which to pull some of the serial lines.
*/
typedef enum _GPLevel {
@@ -213,13 +213,13 @@ int gp_port_usb_msg_write (GPPort *port, int request, int value,
int index, char *bytes, int size);
int gp_port_usb_msg_read (GPPort *port, int request, int value,
int index, char *bytes, int size);
-int gp_port_usb_msg_interface_write (GPPort *port, int request,
+int gp_port_usb_msg_interface_write (GPPort *port, int request,
int value, int index, char *bytes, int size);
-int gp_port_usb_msg_interface_read (GPPort *port, int request,
+int gp_port_usb_msg_interface_read (GPPort *port, int request,
int value, int index, char *bytes, int size);
-int gp_port_usb_msg_class_write (GPPort *port, int request,
+int gp_port_usb_msg_class_write (GPPort *port, int request,
int value, int index, char *bytes, int size);
-int gp_port_usb_msg_class_read (GPPort *port, int request,
+int gp_port_usb_msg_class_read (GPPort *port, int request,
int value, int index, char *bytes, int size);
int gp_port_seek (GPPort *port, int offset, int whence);
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c
index 316bbe8b8..9ea85f030 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -53,7 +53,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -88,7 +88,7 @@ struct _GPPortInfoList {
*
* This function is called by the gp_message_codeset() function, there is
* no need to call it yourself.
- *
+ *
* \param codeset new codeset to use
* \return the previous codeset
*/
@@ -167,7 +167,7 @@ gp_port_info_list_free (GPPortInfoList *list)
* Appends an entry to the list. This function is typically called by
* an io-driver during #gp_port_library_list. If you leave info.name blank,
* #gp_port_info_list_lookup_path will try to match non-existent paths
- * against info.path and - if successful - will append this entry to the
+ * against info.path and - if successful - will append this entry to the
* list.
*
* \return A gphoto2 error code, or an index into the port list (excluding generic entries).
@@ -260,7 +260,7 @@ foreach_func (const char *filename, lt_ptr data)
/**
* \brief Load system ports
- *
+ *
* \param list a #GPPortInfoList
*
* Searches the system for io-drivers and appends them to the list. You would
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-info.h b/libgphoto2_port/libgphoto2_port/gphoto2-port-info.h
index a0db54b73..720e0c8dd 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-info.h
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-info.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c
index 6bf15f6c5..df63197d7 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -48,9 +48,9 @@
#endif
#ifndef DISABLE_DEBUGGING
-/**
+/**
* \brief Internal logging function entry.
- *
+ *
* Internal structure to remember the logging functions.
* Use gp_log_add_func() and gp_log_remove_func() to access it.
*/
@@ -150,7 +150,7 @@ gp_log_remove_func (int id)
}
/**
- * Width of offset field in characters. Note that HEXDUMP_COMPLETE_LINE
+ * Width of offset field in characters. Note that HEXDUMP_COMPLETE_LINE
* needs to be changed when this value is changed.
*/
#define HEXDUMP_OFFSET_WIDTH 4
@@ -175,7 +175,7 @@ gp_log_remove_func (int id)
/**
* We are lazy and do our typing only once. Please note that you have
- * to add/remove some lines when increasing/decreasing the values of
+ * to add/remove some lines when increasing/decreasing the values of
* HEXDUMP_BLOCK_DISTANCE and/or HEXDUMP_OFFSET_WIDTH.
*/
#define HEXDUMP_COMPLETE_LINE {\
@@ -293,7 +293,7 @@ exit:
* \param args the va_list corresponding to format
*
* Logs a message at the given log level. You would normally use this
- * function to log as yet unformatted strings.
+ * function to log as yet unformatted strings.
**/
void
gp_logv (GPLogLevel level, const char *domain, const char *format,
@@ -416,11 +416,11 @@ gp_log_with_source_location(GPLogLevel level, const char *file, int line, const
#ifdef _GPHOTO2_INTERNAL_CODE
-/**
+/**
* \brief (Internal) translate a enumeration code to a string
*/
const char *
-gpi_enum_to_string(unsigned int _enum,
+gpi_enum_to_string(unsigned int _enum,
const StringFlagItem *map)
{
int i;
@@ -433,7 +433,7 @@ gpi_enum_to_string(unsigned int _enum,
return NULL;
}
-/**
+/**
* \brief (Internal) translate a string to an enumeration code
*/
int
@@ -452,7 +452,7 @@ gpi_string_to_enum(const char *str,
}
void
-gpi_flags_to_string_list(unsigned int flags,
+gpi_flags_to_string_list(unsigned int flags,
const StringFlagItem *map,
string_item_func func, void *data)
{
@@ -462,13 +462,13 @@ gpi_flags_to_string_list(unsigned int flags,
func(map[i].str, data);
break;
} else if (0 != (flags & map[i].flag)) {
- func(map[i].str, data);
+ func(map[i].str, data);
}
}
}
-unsigned int
-gpi_string_to_flag(const char *str,
+unsigned int
+gpi_string_to_flag(const char *str,
const StringFlagItem *map)
{
int i;
@@ -480,8 +480,8 @@ gpi_string_to_flag(const char *str,
return 0;
}
-int
-gpi_string_or_to_flags(const char *str,
+int
+gpi_string_or_to_flags(const char *str,
unsigned int *flags,
const StringFlagItem *map)
{
@@ -501,7 +501,7 @@ gpi_string_or_to_flags(const char *str,
}
unsigned int
-gpi_string_list_to_flags(const char *str[],
+gpi_string_list_to_flags(const char *str[],
const StringFlagItem *map)
{
int i;
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c
index 7787a78be..0b40a6af9 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-portability.c
@@ -1,5 +1,5 @@
/** \file
- *
+ *
* \author Copyright 2001 Lutz Mueller <lutz@users.sf.net>
* \author Copyright 1999 Scott Fritzinger <scottf@unr.edu>
*
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -169,10 +169,10 @@ int gp_system_is_dir (const char *dirname) {
#else
-/**
+/**
* \brief mkdir UNIX functionality
* \param dirname directory to create
- *
+ *
* Creates a new directory.
*
* \return a gphoto error code
@@ -186,7 +186,7 @@ int gp_system_mkdir (const char *dirname) {
/**
* \brief rmdir UNIX functionality
* \param dirname directory to remove
- *
+ *
* Removes a empty directory.
*
* \return a gphoto error code
@@ -202,8 +202,8 @@ int gp_system_rmdir (const char *dirname) {
/**
* \brief opendir UNIX functionality
* \param dirname directory to open
- *
- * Opens a directory for readdir and later closedir operations,
+ *
+ * Opens a directory for readdir and later closedir operations,
* to enumerate its contents.
*
* \return a directory handle for use in gp_system_readdir() and gp_system_closedir()
@@ -215,7 +215,7 @@ gp_system_dir gp_system_opendir (const char *dirname) {
/**
* \brief readdir UNIX functionality
* \param d directory to enumerate
- *
+ *
* Reads one directory entry from the specified directory handle
* as returned from gp_system_opendir(). Use gp_system_filename()
* to extract the filename from the returned value.
@@ -229,7 +229,7 @@ gp_system_dirent gp_system_readdir (gp_system_dir d) {
/**
* \brief retrieve UNIX filename out of a directory entry
* \param de directory entry as returned from gp_system_readdir()
- *
+ *
* Extracts a filename out of the passed directory entry.
*
* \return the filename of the directory entry
@@ -241,8 +241,8 @@ const char *gp_system_filename (gp_system_dirent de) {
/**
* \brief closedir UNIX functionality
* \param dir directory to close
- *
- * Closes a directory after readdir operations.
+ *
+ * Closes a directory after readdir operations.
*
* \return a gphoto error code
*/
@@ -254,7 +254,7 @@ int gp_system_closedir (gp_system_dir dir) {
/**
* \brief check if passed filename is a file
* \param filename file name to check
- *
+ *
* Checks whether the passed in filename is
* a file and returns this as boolean.
*
@@ -271,7 +271,7 @@ int gp_system_is_file (const char *filename) {
/**
* \brief check if passed filename is a directory
* \param dirname file name to check
- *
+ *
* Checks whether the passed in dirname is
* a directory and returns this as boolean.
*
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-result.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-result.c
index 653176935..8b0c19eb6 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-result.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-result.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -23,7 +23,7 @@
#ifdef ENABLE_NLS
# include <libintl.h>
-# undef _
+# undef _
# define _(String) dgettext (GETTEXT_PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-version.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-version.c
index 136b78358..10724ab0f 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-version.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-version.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port.c b/libgphoto2_port/libgphoto2_port/gphoto2-port.c
index 8f84482a2..71c9d4e21 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/** \file
- *
+ *
* \author Copyright 2001 Lutz Mueller <lutz@users.sf.net>
* \author Copyright 1999 Scott Fritzinger <scottf@unr.edu>
*
@@ -11,10 +11,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -83,7 +83,7 @@ struct _GPPortPrivateCore {
*
* Allocate and initialize the memory for a new #GPPort.
*
- * After you called this function,
+ * After you called this function,
* you probably want to call #gp_port_set_info in order to make the newly
* created port functional.
*
@@ -139,7 +139,7 @@ gp_port_exit (GPPort *port)
* information (from the serial:/dev/ttyS0 or similar variables).
* After calling this function, you can access the port using for
* example gp_port_open().
- *
+ *
* \param port a GPPort
* \param info the GPPortInfo to set
*
@@ -264,7 +264,7 @@ gp_port_get_info (GPPort *port, GPPortInfo *info)
* \brief Open a port.
* \param port a #GPPort
*
- * Opens a port which should have been created with #gp_port_new and
+ * Opens a port which should have been created with #gp_port_new and
* configured with #gp_port_set_info and #gp_port_set_settings
*
* \return a gphoto2 error code
@@ -520,7 +520,7 @@ gp_port_check_int_fast (GPPort *port, char *data, int size)
/**
- * \brief Set timeout of port
+ * \brief Set timeout of port
* \param port a #GPPort
* \param timeout the timeout
*
@@ -595,7 +595,7 @@ gp_port_set_settings (GPPort *port, GPPortSettings settings)
CHECK_INIT (port);
/*
- * We copy the settings to settings_pending and call update on the
+ * We copy the settings to settings_pending and call update on the
* port.
*/
memcpy (&port->settings_pending, &settings,
@@ -644,7 +644,7 @@ gp_port_get_settings (GPPort *port, GPPortSettings *settings)
* \param port a GPPort
* \param pin the serial pin to be retrieved
* \param level the setting of the pin
- *
+ *
* \return a gphoto2 error code
*/
int
@@ -915,8 +915,8 @@ gp_port_usb_msg_read (GPPort *port, int request, int value, int index,
return (retval);
}
-/*
- * The next two functions handle the request types 0x41 for write
+/*
+ * The next two functions handle the request types 0x41 for write
* and 0xc1 for read.
*/
/**
@@ -934,7 +934,7 @@ gp_port_usb_msg_read (GPPort *port, int request, int value, int index,
* \return a gphoto2 error code
*/
int
-gp_port_usb_msg_interface_write (GPPort *port, int request,
+gp_port_usb_msg_interface_write (GPPort *port, int request,
int value, int index, char *bytes, int size)
{
int retval;
@@ -946,7 +946,7 @@ gp_port_usb_msg_interface_write (GPPort *port, int request,
CHECK_INIT (port);
CHECK_SUPP (port, "msg_build", port->pc->ops->msg_interface_write);
- retval = port->pc->ops->msg_interface_write(port, request,
+ retval = port->pc->ops->msg_interface_write(port, request,
value, index, bytes, size);
CHECK_RESULT (retval);
@@ -981,7 +981,7 @@ gp_port_usb_msg_interface_read (GPPort *port, int request, int value, int index,
CHECK_INIT (port);
CHECK_SUPP (port, "msg_read", port->pc->ops->msg_interface_read);
- retval = port->pc->ops->msg_interface_read (port, request,
+ retval = port->pc->ops->msg_interface_read (port, request,
value, index, bytes, size);
CHECK_RESULT (retval);
@@ -992,8 +992,8 @@ gp_port_usb_msg_interface_read (GPPort *port, int request, int value, int index,
}
-/*
- * The next two functions handle the request types 0x21 for write
+/*
+ * The next two functions handle the request types 0x21 for write
* and 0xa1 for read.
*/
@@ -1012,7 +1012,7 @@ gp_port_usb_msg_interface_read (GPPort *port, int request, int value, int index,
* \return a gphoto2 error code
*/
int
-gp_port_usb_msg_class_write (GPPort *port, int request,
+gp_port_usb_msg_class_write (GPPort *port, int request,
int value, int index, char *bytes, int size)
{
int retval;
@@ -1024,7 +1024,7 @@ gp_port_usb_msg_class_write (GPPort *port, int request,
CHECK_INIT (port);
CHECK_SUPP (port, "msg_build", port->pc->ops->msg_class_write);
- retval = port->pc->ops->msg_class_write(port, request,
+ retval = port->pc->ops->msg_class_write(port, request,
value, index, bytes, size);
CHECK_RESULT (retval);
@@ -1059,7 +1059,7 @@ gp_port_usb_msg_class_read (GPPort *port, int request, int value, int index,
CHECK_INIT (port);
CHECK_SUPP (port, "msg_read", port->pc->ops->msg_class_read);
- retval = port->pc->ops->msg_class_read (port, request,
+ retval = port->pc->ops->msg_class_read (port, request,
value, index, bytes, size);
CHECK_RESULT (retval);
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c
index efdbf3b74..65bc40b03 100644
--- a/libgphoto2_port/libusb1/libusb1.c
+++ b/libgphoto2_port/libusb1/libusb1.c
@@ -10,10 +10,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -243,7 +243,7 @@ gp_port_library_list (GPPortInfoList *list)
}
for (i1 = 0; i1 < config->bNumInterfaces; i1++)
for (i2 = 0; i2 < config->interface[i1].num_altsetting; i2++) {
- const struct libusb_interface_descriptor *intf = &config->interface[i1].altsetting[i2];
+ const struct libusb_interface_descriptor *intf = &config->interface[i1].altsetting[i2];
if ( (intf->bInterfaceClass == LIBUSB_CLASS_HID) ||
(intf->bInterfaceClass == LIBUSB_CLASS_PRINTER) ||
(intf->bInterfaceClass == LIBUSB_CLASS_COMM) ||
@@ -259,7 +259,7 @@ gp_port_library_list (GPPortInfoList *list)
continue;
/* Note: We do not skip USB storage. Some devices can support both,
* and the Ricoh erronously reports it.
- */
+ */
nrofdevices++;
}
@@ -269,7 +269,7 @@ gp_port_library_list (GPPortInfoList *list)
*/
/* We never want to return just "usb:" ... also return "usb:XXX,YYY", and
* let upper layers filter out the usb: */
- if (nrofdevices <= 1)
+ if (nrofdevices <= 1)
return (GP_OK);
#endif
@@ -298,7 +298,7 @@ gp_port_library_list (GPPortInfoList *list)
}
for (i1 = 0; i1 < config->bNumInterfaces; i1++)
for (i2 = 0; i2 < config->interface[i1].num_altsetting; i2++) {
- const struct libusb_interface_descriptor *intf = &config->interface[i1].altsetting[i2];
+ const struct libusb_interface_descriptor *intf = &config->interface[i1].altsetting[i2];
if ( (intf->bInterfaceClass == LIBUSB_CLASS_HID) ||
(intf->bInterfaceClass == LIBUSB_CLASS_PRINTER) ||
(intf->bInterfaceClass == LIBUSB_CLASS_COMM))
@@ -312,7 +312,7 @@ gp_port_library_list (GPPortInfoList *list)
continue;
/* Note: We do not skip USB storage. Some devices can support both,
* and the Ricoh erronously reports it.
- */
+ */
C_GP (gp_port_info_new (&info));
gp_port_info_set_type (info, GP_PORT_USB);
gp_port_info_set_name (info, "Universal Serial Bus");
@@ -848,12 +848,12 @@ gp_libusb1_msg_read_lib(GPPort *port, int request, int value, int index,
GP_ERROR_IO_READ);
}
-/* The next two functions support the nonstandard request types 0x41 (write)
- * and 0xc1 (read), which are occasionally needed.
+/* The next two functions support the nonstandard request types 0x41 (write)
+ * and 0xc1 (read), which are occasionally needed.
*/
static int
-gp_libusb1_msg_interface_write_lib(GPPort *port, int request,
+gp_libusb1_msg_interface_write_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
return gp_libusb1_msg (port, request, value, index, bytes, size,
@@ -863,7 +863,7 @@ gp_libusb1_msg_interface_write_lib(GPPort *port, int request,
static int
-gp_libusb1_msg_interface_read_lib(GPPort *port, int request,
+gp_libusb1_msg_interface_read_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
return gp_libusb1_msg (port, request, value, index, bytes, size,
@@ -872,12 +872,12 @@ gp_libusb1_msg_interface_read_lib(GPPort *port, int request,
}
-/* The next two functions support the nonstandard request types 0x21 (write)
- * and 0xa1 (read), which are occasionally needed.
+/* The next two functions support the nonstandard request types 0x21 (write)
+ * and 0xa1 (read), which are occasionally needed.
*/
static int
-gp_libusb1_msg_class_write_lib(GPPort *port, int request,
+gp_libusb1_msg_class_write_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
return gp_libusb1_msg (port, request, value, index, bytes, size,
@@ -887,7 +887,7 @@ gp_libusb1_msg_class_write_lib(GPPort *port, int request,
static int
-gp_libusb1_msg_class_read_lib(GPPort *port, int request,
+gp_libusb1_msg_class_read_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
return gp_libusb1_msg (port, request, value, index, bytes, size,
@@ -956,7 +956,7 @@ gp_libusb1_update (GPPort *port)
}
if (port->settings.usb.config != port->pl->config) {
GP_LOG_D ("changing config %d -> %d", port->pl->config, port->settings.usb.config);
- /* This can only be changed with the interface released.
+ /* This can only be changed with the interface released.
* This is a hard requirement since 2.6.12.
*/
if ((port->pl->config != -1) && (LOG_ON_LIBUSB_E (libusb_release_interface (port->pl->dh, port->settings.usb.interface)))) {
@@ -972,7 +972,7 @@ gp_libusb1_update (GPPort *port)
port->settings.usb.interface,
port->settings.usb.config,
strerror(saved_errno));
- return GP_ERROR_IO_UPDATE;
+ return GP_ERROR_IO_UPDATE;
#endif
GP_LOG_E ("setting configuration from %d to %d failed, but continuing...", port->pl->config, port->settings.usb.config);
}
@@ -1261,7 +1261,7 @@ gp_libusb1_match_mtp_device(struct libusb_device *dev,int *configno, int *interf
xifaces++;
for (k = 0; k < dev->config[i].interface[j].num_altsetting; k++) {
- struct usb_interface_descriptor *intf = &dev->config[i].interface[j].altsetting[k];
+ struct usb_interface_descriptor *intf = &dev->config[i].interface[j].altsetting[k];
if ( (intf->bInterfaceClass == LIBUSB_CLASS_HID) ||
(intf->bInterfaceClass == LIBUSB_CLASS_PRINTER) ||
(intf->bInterfaceClass == LIBUSB_CLASS_AUDIO) ||
@@ -1282,8 +1282,8 @@ gp_libusb1_match_mtp_device(struct libusb_device *dev,int *configno, int *interf
return 0;
/*
- * Loop over the device configurations and interfaces. Nokia MTP-capable
- * handsets (possibly others) typically have the string "MTP" in their
+ * Loop over the device configurations and interfaces. Nokia MTP-capable
+ * handsets (possibly others) typically have the string "MTP" in their
* MTP interface descriptions, that's how they can be detected, before
* we try the more esoteric "OS descriptors" (below).
*/
@@ -1295,9 +1295,9 @@ gp_libusb1_match_mtp_device(struct libusb_device *dev,int *configno, int *interf
int k;
for (k = 0; k < dev->config[i].interface[j].num_altsetting; k++) {
buf[0] = '\0';
- ret = usb_get_string_simple(devh,
- dev->config[i].interface[j].altsetting[k].iInterface,
- (char *) buf,
+ ret = usb_get_string_simple(devh,
+ dev->config[i].interface[j].altsetting[k].iInterface,
+ (char *) buf,
1024);
if (ret < 3)
continue;
diff --git a/libgphoto2_port/ptpip/ptpip.c b/libgphoto2_port/ptpip/ptpip.c
index 20947d805..b21eef42c 100644
--- a/libgphoto2_port/ptpip/ptpip.c
+++ b/libgphoto2_port/ptpip/ptpip.c
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -210,7 +210,7 @@ gp_port_library_list (GPPortInfoList *list)
/* We need to make it a non-blocking query */
fd = DNSServiceRefSockFD(sd);
if (fd != -1) {
- FD_ZERO (&infds); FD_SET (fd, &infds);
+ FD_ZERO (&infds); FD_SET (fd, &infds);
tv.tv_sec = 0; tv.tv_usec = 1;
/* If we have input, we can try to process a result */
if (1 == select (fd+1, &infds, NULL, NULL, &tv))
diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c
index d47d7ba4f..44a22b219 100644
--- a/libgphoto2_port/serial/unix.c
+++ b/libgphoto2_port/serial/unix.c
@@ -9,17 +9,17 @@
* Based on work by:
* Copyright 1999 Beat Christen <spiff@longstreet.ch>
* for the toshiba gPhoto library.
- *
+ *
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -84,7 +84,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -182,7 +182,7 @@
/* IRIX */
#if defined(__sgi)
#define GP_PORT_SERIAL_PREFIX "/dev/ttyd%i"
-#define GP_PORT_SERIAL_RANGE_LOW 1
+#define GP_PORT_SERIAL_RANGE_LOW 1
#define GP_PORT_SERIAL_RANGE_HIGH 11
#endif
@@ -210,7 +210,7 @@ struct _GPPortPrivateLibrary {
static int gp_port_serial_check_speed (GPPort *dev);
GPPortType
-gp_port_library_type ()
+gp_port_library_type ()
{
return (GP_PORT_SERIAL);
}
@@ -231,7 +231,7 @@ gp_port_serial_lock (GPPort *dev, const char *path)
"'%s'"), path);
return (GP_ERROR_IO_LOCK);
}
-#define __HAVE_LOCKING
+#define __HAVE_LOCKING
#elif defined(HAVE_LOCKDEV)
pid = dev_lock (path);
if (pid) {
@@ -246,14 +246,14 @@ gp_port_serial_lock (GPPort *dev, const char *path)
}
return (GP_ERROR_IO_LOCK);
}
-#define __HAVE_LOCKING
+#define __HAVE_LOCKING
#endif
#ifndef __HAVE_LOCKING
# ifdef __GCC__
-# warning No locking library found.
+# warning No locking library found.
# warning You will run into problems if you use
-# warning gphoto2 with a serial (RS232) camera in
+# warning gphoto2 with a serial (RS232) camera in
# warning combination with Konqueror (KDE) or Nautilus (GNOME).
# warning This will *not* concern USB cameras.
# endif
@@ -500,7 +500,7 @@ gp_port_serial_write (GPPort *dev, const char *bytes, int size)
len = 0;
while (len < size) {
-
+
/*
* Make sure we write all data while handling
* the harmless errors
@@ -558,7 +558,7 @@ gp_port_serial_read (GPPort *dev, char *bytes, int size)
/* Set timeout value within input loop */
timeout.tv_usec = (dev->timeout % 1000) * 1000;
- timeout.tv_sec = (dev->timeout / 1000);
+ timeout.tv_sec = (dev->timeout / 1000);
/* Any data available? */
if (!select (dev->pl->fd + 1, &readfs, NULL, NULL, &timeout))
@@ -584,7 +584,7 @@ gp_port_serial_read (GPPort *dev, char *bytes, int size)
* as 0xff 0x00 sequence.
*
* 0xff sent by the camera are escaped as
- * 0xff 0xff sequence.
+ * 0xff 0xff sequence.
*
* All other 0xff 0xXX sequences are errors.
*
@@ -960,7 +960,7 @@ gp_port_library_operations ()
ops = malloc (sizeof (GPPortOperations));
if (!ops)
return (NULL);
- memset (ops, 0, sizeof (GPPortOperations));
+ memset (ops, 0, sizeof (GPPortOperations));
ops->init = gp_port_serial_init;
ops->exit = gp_port_serial_exit;
diff --git a/libgphoto2_port/test/test-gp-port.c b/libgphoto2_port/test/test-gp-port.c
index 91d4eef5c..2737d7b2a 100644
--- a/libgphoto2_port/test/test-gp-port.c
+++ b/libgphoto2_port/test/test-gp-port.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -79,20 +79,20 @@ main (int argc, char **argv)
gp_port_result_as_string (ret));
return (1);
}
-
+
ret = gp_port_info_list_load (il);
if (ret < 0) {
printf ("Could not load list of ports: %s\n",
gp_port_result_as_string (ret));
return (1);
}
-
+
printf ("############\n");
printf ("############ There are %i IO-drivers "
"installed on your system.\n",
gp_port_info_list_count (il));
printf ("############\n");
-
+
ret = gp_port_info_list_get_info (il, 0, &info);
if (ret < 0) {
printf ("Could not get info of first port in "
diff --git a/libgphoto2_port/test/test-port-list.c b/libgphoto2_port/test/test-port-list.c
index 4da17af58..7b39274d4 100644
--- a/libgphoto2_port/test/test-port-list.c
+++ b/libgphoto2_port/test/test-port-list.c
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -63,14 +63,14 @@ run_test ()
gp_port_result_as_string (ret));
return (1);
}
-
+
ret = gp_port_info_list_load (il);
if (ret < 0) {
printf ("Could not load list of ports: %s\n",
gp_port_result_as_string (ret));
return (2);
}
-
+
count = gp_port_info_list_count (il);
if (count < 0) {
printf("gp_port_info_list_count error: %d\n", count);
diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c
index 6d6f6e946..f0eddb426 100644
--- a/libgphoto2_port/usb/libusb.c
+++ b/libgphoto2_port/usb/libusb.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -124,7 +124,7 @@ gp_port_library_list (GPPortInfoList *list)
}
for (i1 = 0; i1 < dev->config[i].bNumInterfaces; i1++)
for (i2 = 0; i2 < dev->config[i].interface[i1].num_altsetting; i2++) {
- struct usb_interface_descriptor *intf = &dev->config[i].interface[i1].altsetting[i2];
+ struct usb_interface_descriptor *intf = &dev->config[i].interface[i1].altsetting[i2];
if ( (intf->bInterfaceClass == USB_CLASS_HID) ||
(intf->bInterfaceClass == USB_CLASS_PRINTER) ||
(intf->bInterfaceClass == USB_CLASS_COMM) ||
@@ -139,7 +139,7 @@ gp_port_library_list (GPPortInfoList *list)
continue;
/* Note: We do not skip USB storage. Some devices can support both,
* and the Ricoh erronously reports it.
- */
+ */
nrofdevices++;
}
bus = bus->next;
@@ -151,7 +151,7 @@ gp_port_library_list (GPPortInfoList *list)
*/
/* We never want to return just "usb:" ... also return "usb:XXX,YYY", and
* let upper layers filter out the usb: */
- if (nrofdevices <= 1)
+ if (nrofdevices <= 1)
return (GP_OK);
#endif
@@ -180,7 +180,7 @@ gp_port_library_list (GPPortInfoList *list)
}
for (i1 = 0; i1 < dev->config[i].bNumInterfaces; i1++)
for (i2 = 0; i2 < dev->config[i].interface[i1].num_altsetting; i2++) {
- struct usb_interface_descriptor *intf = &dev->config[i].interface[i1].altsetting[i2];
+ struct usb_interface_descriptor *intf = &dev->config[i].interface[i1].altsetting[i2];
if ( (intf->bInterfaceClass == USB_CLASS_HID) ||
(intf->bInterfaceClass == USB_CLASS_PRINTER) ||
(intf->bInterfaceClass == USB_CLASS_COMM))
@@ -193,7 +193,7 @@ gp_port_library_list (GPPortInfoList *list)
continue;
/* Note: We do not skip USB storage. Some devices can support both,
* and the Ricoh erronously reports it.
- */
+ */
gp_port_info_new (&info);
gp_port_info_set_type (info, GP_PORT_USB);
gp_port_info_set_name (info, "Universal Serial Bus");
@@ -493,57 +493,57 @@ gp_port_usb_msg_read_lib(GPPort *port, int request, int value, int index,
request, value, index, bytes, size, port->timeout);
}
-/* The next two functions support the nonstandard request types 0x41 (write)
- * and 0xc1 (read), which are occasionally needed.
+/* The next two functions support the nonstandard request types 0x41 (write)
+ * and 0xc1 (read), which are occasionally needed.
*/
static int
-gp_port_usb_msg_interface_write_lib(GPPort *port, int request,
+gp_port_usb_msg_interface_write_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
C_PARAMS (port && port->pl->dh);
- return usb_control_msg(port->pl->dh,
+ return usb_control_msg(port->pl->dh,
USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
request, value, index, bytes, size, port->timeout);
}
static int
-gp_port_usb_msg_interface_read_lib(GPPort *port, int request,
+gp_port_usb_msg_interface_read_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
C_PARAMS (port && port->pl->dh);
- return usb_control_msg(port->pl->dh,
+ return usb_control_msg(port->pl->dh,
USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_ENDPOINT_IN,
request, value, index, bytes, size, port->timeout);
}
-/* The next two functions support the nonstandard request types 0x21 (write)
- * and 0xa1 (read), which are occasionally needed.
+/* The next two functions support the nonstandard request types 0x21 (write)
+ * and 0xa1 (read), which are occasionally needed.
*/
static int
-gp_port_usb_msg_class_write_lib(GPPort *port, int request,
+gp_port_usb_msg_class_write_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
C_PARAMS (port && port->pl->dh);
- return usb_control_msg(port->pl->dh,
+ return usb_control_msg(port->pl->dh,
USB_TYPE_CLASS | USB_RECIP_INTERFACE,
request, value, index, bytes, size, port->timeout);
}
static int
-gp_port_usb_msg_class_read_lib(GPPort *port, int request,
+gp_port_usb_msg_class_read_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
C_PARAMS (port && port->pl->dh);
- return usb_control_msg(port->pl->dh,
+ return usb_control_msg(port->pl->dh,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_ENDPOINT_IN,
request, value, index, bytes, size, port->timeout);
}
@@ -618,7 +618,7 @@ gp_port_usb_update (GPPort *port)
port->pl->config,
port->settings.usb.config
);
- /* This can only be changed with the interface released.
+ /* This can only be changed with the interface released.
* This is a hard requirement since 2.6.12.
*/
if (usb_release_interface (port->pl->dh,
@@ -638,7 +638,7 @@ gp_port_usb_update (GPPort *port)
port->settings.usb.interface,
port->settings.usb.config,
strerror(saved_errno));
- return GP_ERROR_IO_UPDATE;
+ return GP_ERROR_IO_UPDATE;
#endif
GP_LOG_E ("setting configuration from %d to %d failed with ret = %d, but continue...", port->pl->config, port->settings.usb.config, ret);
}
@@ -946,7 +946,7 @@ gp_port_usb_match_mtp_device(struct usb_device *dev,int *configno, int *interfac
xifaces++;
for (k = 0; k < dev->config[i].interface[j].num_altsetting; k++) {
- struct usb_interface_descriptor *intf = &dev->config[i].interface[j].altsetting[k];
+ struct usb_interface_descriptor *intf = &dev->config[i].interface[j].altsetting[k];
if ( (intf->bInterfaceClass == USB_CLASS_HID) ||
(intf->bInterfaceClass == USB_CLASS_PRINTER) ||
(intf->bInterfaceClass == USB_CLASS_AUDIO) ||
@@ -971,8 +971,8 @@ gp_port_usb_match_mtp_device(struct usb_device *dev,int *configno, int *interfac
return 0;
/*
- * Loop over the device configurations and interfaces. Nokia MTP-capable
- * handsets (possibly others) typically have the string "MTP" in their
+ * Loop over the device configurations and interfaces. Nokia MTP-capable
+ * handsets (possibly others) typically have the string "MTP" in their
* MTP interface descriptions, that's how they can be detected, before
* we try the more esoteric "OS descriptors" (below).
*/
@@ -984,9 +984,9 @@ gp_port_usb_match_mtp_device(struct usb_device *dev,int *configno, int *interfac
int k;
for (k = 0; k < dev->config[i].interface[j].num_altsetting; k++) {
buf[0] = '\0';
- ret = usb_get_string_simple(devh,
- dev->config[i].interface[j].altsetting[k].iInterface,
- (char *) buf,
+ ret = usb_get_string_simple(devh,
+ dev->config[i].interface[j].altsetting[k].iInterface,
+ (char *) buf,
1024);
if (ret < 3)
continue;
diff --git a/libgphoto2_port/usb/usb-os2.c b/libgphoto2_port/usb/usb-os2.c
index ec7a86cdb..33a111934 100644
--- a/libgphoto2_port/usb/usb-os2.c
+++ b/libgphoto2_port/usb/usb-os2.c
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Library General Public
License along with the GPIO Library; see the file COPYING.LIB. If not,
- write to the
+ write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
*/
diff --git a/libgphoto2_port/usbdiskdirect/linux.c b/libgphoto2_port/usbdiskdirect/linux.c
index a5de0b01a..a62cc5280 100644
--- a/libgphoto2_port/usbdiskdirect/linux.c
+++ b/libgphoto2_port/usbdiskdirect/linux.c
@@ -1,5 +1,5 @@
/* Direct IO to USB Mass storage devices port library for Linux
- *
+ *
* Copyright (c) 2010 Hans de Goede <hdegoede@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -75,7 +75,7 @@ struct _GPPortPrivateLibrary {
};
GPPortType
-gp_port_library_type ()
+gp_port_library_type ()
{
return GP_PORT_USB_DISK_DIRECT;
}
@@ -103,9 +103,9 @@ gp_port_usbdiskdirect_lock (GPPort *port, const char *path)
}
#else
# ifdef __GCC__
-# warning No locking library found.
+# warning No locking library found.
# warning You will run into problems if you use
-# warning gphoto2 with a usbdiskdirect picframe in
+# warning gphoto2 with a usbdiskdirect picframe in
# warning combination with Konqueror (KDE) or Nautilus (GNOME).
# warning This will *not* concern USB cameras.
# endif
@@ -172,7 +172,7 @@ gp_port_usbdiskdirect_resolve_symlink (const char *link)
return path;
}
-static int
+static int
gp_port_usbdiskdirect_get_usb_id (const char *disk,
unsigned short *vendor_id, unsigned short *product_id)
{
diff --git a/libgphoto2_port/usbscsi/linux.c b/libgphoto2_port/usbscsi/linux.c
index 1d22acf1f..110f17c1e 100644
--- a/libgphoto2_port/usbscsi/linux.c
+++ b/libgphoto2_port/usbscsi/linux.c
@@ -1,5 +1,5 @@
/* SCSI commands to USB Mass storage devices port library for Linux
- *
+ *
* Copyright (c) 2010-2012 Hans de Goede <hdegoede@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the
+ * along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
@@ -72,7 +72,7 @@
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
-# endif
+# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
@@ -90,7 +90,7 @@ struct _GPPortPrivateLibrary {
};
GPPortType
-gp_port_library_type ()
+gp_port_library_type ()
{
return GP_PORT_USB_SCSI;
}
@@ -167,7 +167,7 @@ gp_port_usbscsi_resolve_symlink (const char *link)
return path;
}
-static int
+static int
gp_port_usbscsi_get_usb_id (const char *sg,
unsigned short *vendor_id, unsigned short *product_id)
{
diff --git a/libgphoto2_port/vusb/vcamera.h b/libgphoto2_port/vusb/vcamera.h
index b6fe4ae3b..db8426fd6 100644
--- a/libgphoto2_port/vusb/vcamera.h
+++ b/libgphoto2_port/vusb/vcamera.h
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/libgphoto2_port/vusb/vusb.c b/libgphoto2_port/vusb/vusb.c
index e7711640a..d97811c8c 100644
--- a/libgphoto2_port/vusb/vusb.c
+++ b/libgphoto2_port/vusb/vusb.c
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -234,11 +234,11 @@ gp_port_vusb_clear_halt_lib(GPPort *port, int ep)
return GP_OK;
}
-/* The next two functions support the nonstandard request types 0x41 (write)
- * and 0xc1 (read), which are occasionally needed.
+/* The next two functions support the nonstandard request types 0x41 (write)
+ * and 0xc1 (read), which are occasionally needed.
*/
static int
-gp_port_vusb_msg_interface_write_lib(GPPort *port, int request,
+gp_port_vusb_msg_interface_write_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
gp_log(GP_LOG_DEBUG,__FUNCTION__,"()");
@@ -247,7 +247,7 @@ gp_port_vusb_msg_interface_write_lib(GPPort *port, int request,
static int
-gp_port_vusb_msg_interface_read_lib(GPPort *port, int request,
+gp_port_vusb_msg_interface_read_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
gp_log(GP_LOG_DEBUG,__FUNCTION__,"(req=%x, value=%x, index=%d, size=%d)", request, value, index, size);
@@ -255,11 +255,11 @@ gp_port_vusb_msg_interface_read_lib(GPPort *port, int request,
}
-/* The next two functions support the nonstandard request types 0x21 (write)
- * and 0xa1 (read), which are occasionally needed.
+/* The next two functions support the nonstandard request types 0x21 (write)
+ * and 0xa1 (read), which are occasionally needed.
*/
static int
-gp_port_vusb_msg_class_write_lib(GPPort *port, int request,
+gp_port_vusb_msg_class_write_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
gp_log(GP_LOG_DEBUG,__FUNCTION__,"()");
@@ -269,7 +269,7 @@ gp_port_vusb_msg_class_write_lib(GPPort *port, int request,
static int
-gp_port_vusb_msg_class_read_lib(GPPort *port, int request,
+gp_port_vusb_msg_class_read_lib(GPPort *port, int request,
int value, int index, char *bytes, int size)
{
gp_log(GP_LOG_DEBUG,__FUNCTION__,"()");
@@ -310,7 +310,7 @@ gp_port_vusb_find_device_lib(GPPort *port, int idvendor, int idproduct)
gp_port_info_get_path (info, &path);
if (!lastpath || strcmp(path, lastpath)) {
- gp_log(GP_LOG_DEBUG,__FUNCTION__,"(path=%s)", path);
+ gp_log(GP_LOG_DEBUG,__FUNCTION__,"(path=%s)", path);
if (lastpath) {
free(lastpath);
}
@@ -321,9 +321,9 @@ gp_port_vusb_find_device_lib(GPPort *port, int idvendor, int idproduct)
vendor = product = 0;
if (fd != -1) {
if (-1 == read( fd, &vendor, 2))
- gp_log(GP_LOG_DEBUG,__FUNCTION__,"could not read vendor");
+ gp_log(GP_LOG_DEBUG,__FUNCTION__,"could not read vendor");
if (-1 == read( fd, &product, 2))
- gp_log(GP_LOG_DEBUG,__FUNCTION__,"could not read product");
+ gp_log(GP_LOG_DEBUG,__FUNCTION__,"could not read product");
close(fd);
}
}
@@ -340,7 +340,7 @@ gp_port_vusb_find_device_lib(GPPort *port, int idvendor, int idproduct)
port->settings.usb.maxpacketsize = 512;
return GP_OK;
}
- gp_log(GP_LOG_DEBUG,__FUNCTION__,"(0x%04x,0x%04x)", idvendor, idproduct);
+ gp_log(GP_LOG_DEBUG,__FUNCTION__,"(0x%04x,0x%04x)", idvendor, idproduct);
return GP_ERROR_IO_USB_FIND;
}
diff --git a/packaging/generic/print-camera-list.c b/packaging/generic/print-camera-list.c
index 9057278b8..babc9dd8d 100644
--- a/packaging/generic/print-camera-list.c
+++ b/packaging/generic/print-camera-list.c
@@ -9,10 +9,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -92,7 +92,7 @@ typedef int (* begin_func_t) (const func_params_t *params,
void **data);
typedef int (* middle_func_t) (const func_params_t *params,
void **data);
-typedef int (* camera_func_t) (const func_params_t *params,
+typedef int (* camera_func_t) (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *ca,
@@ -204,7 +204,7 @@ hotplug_begin_func (const func_params_t *params, void **data)
/* print_usb_usermap
*
- * Print out lines that can be included into usb.usermap
+ * Print out lines that can be included into usb.usermap
* - for all cams supported by our instance of libgphoto2.
*
* usb.usermap is a file used by
@@ -212,7 +212,7 @@ hotplug_begin_func (const func_params_t *params, void **data)
*/
static int
-hotplug_camera_func (const func_params_t *params,
+hotplug_camera_func (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -220,7 +220,7 @@ hotplug_camera_func (const func_params_t *params,
{
int flags = 0;
int class = 0, subclass = 0, proto = 0;
- const char *usermap_script =
+ const char *usermap_script =
((*params->argv)[0] != NULL)
?((*params->argv)[0])
:(GP_USB_HOTPLUG_SCRIPT);
@@ -230,7 +230,7 @@ hotplug_camera_func (const func_params_t *params,
class = 0;
subclass = 0;
proto = 0;
- flags = (GP_USB_HOTPLUG_MATCH_VENDOR_ID
+ flags = (GP_USB_HOTPLUG_MATCH_VENDOR_ID
| GP_USB_HOTPLUG_MATCH_PRODUCT_ID);
} else if ((a->usb_class) && (a->usb_class != 666)) {
class = a->usb_class;
@@ -252,7 +252,7 @@ hotplug_camera_func (const func_params_t *params,
}
if (params->add_comments) {
- printf ("# %s\n",
+ printf ("# %s\n",
a->model);
}
/* The first 3 lone bytes are the device class.
@@ -264,7 +264,7 @@ hotplug_camera_func (const func_params_t *params,
"0x0000 0x00 0x00 "
"0x00 0x%02x 0x%02x "
"0x%02x 0x00000000\n",
- usermap_script, flags,
+ usermap_script, flags,
a->usb_vendor, a->usb_product,
class, subclass, proto);
return 0;
@@ -317,7 +317,7 @@ path_basename (const char *pathname)
char *result, *tmp;
/* remove path part from camlib name */
for (result=tmp=(char *)pathname; (*tmp!='\0'); tmp++) {
- if ((*tmp == gp_system_dir_delim)
+ if ((*tmp == gp_system_dir_delim)
&& (*(tmp+1) != '\0')) {
result = tmp+1;
}
@@ -327,8 +327,8 @@ path_basename (const char *pathname)
static int
-human_camera_func (const func_params_t *params,
- const int i,
+human_camera_func (const func_params_t *params,
+ const int i,
const int total,
const CameraAbilities *a,
void *data)
@@ -336,7 +336,7 @@ human_camera_func (const func_params_t *params,
const char *camlib_basename;
camlib_basename = path_basename(a->library);
printf("%3d|%-20s|%-20s|%s\n",
- i+1,
+ i+1,
camlib_basename,
a->id,
a->model);
@@ -345,8 +345,8 @@ human_camera_func (const func_params_t *params,
static int
-idlist_camera_func (const func_params_t *params,
- const int i,
+idlist_camera_func (const func_params_t *params,
+ const int i,
const int total,
const CameraAbilities *a,
void *data)
@@ -465,7 +465,7 @@ udev_parse_params (const func_params_t *params, void **data)
if (1) {
int i;
char *key = NULL, *val = NULL;
- for (i=0; ((key=(*params->argv)[i]) != NULL) &&
+ for (i=0; ((key=(*params->argv)[i]) != NULL) &&
((val=(*params->argv)[i+1]) != NULL); i+=2) {
if (0) {
/* nothing */
@@ -499,8 +499,8 @@ udev_parse_params (const func_params_t *params, void **data)
&& (pdata->version <= UDEV_0_98)) {
FATAL("Either <script> or <mode,group,owner> parameters must be given.");
}
- if ((pdata->script != NULL) && (pdata->mode != NULL
- || pdata->group != NULL
+ if ((pdata->script != NULL) && (pdata->mode != NULL
+ || pdata->group != NULL
|| pdata->owner != NULL)) {
FATAL("The <script> parameter conflicts with the <mode,group,owner> parameters.");
}
@@ -577,7 +577,7 @@ udev_end_func (const func_params_t *params, void *data)
static int
-udev_camera_func (const func_params_t *params,
+udev_camera_func (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -598,7 +598,7 @@ udev_camera_func (const func_params_t *params,
class = 0;
subclass = 0;
proto = 0;
- flags = (GP_USB_HOTPLUG_MATCH_VENDOR_ID
+ flags = (GP_USB_HOTPLUG_MATCH_VENDOR_ID
| GP_USB_HOTPLUG_MATCH_PRODUCT_ID);
} else {
if (a->usb_class) {
@@ -684,7 +684,7 @@ udev_camera_func (const func_params_t *params,
static int
-udev_camera_func2 (const func_params_t *params,
+udev_camera_func2 (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -750,7 +750,7 @@ hwdb_begin_func (const func_params_t *params, void **data)
static int
-hwdb_camera_func (const func_params_t *params,
+hwdb_camera_func (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -765,7 +765,7 @@ hwdb_camera_func (const func_params_t *params,
return 0;
if (a->usb_vendor) { /* usb product id may be zero! */
- flags = (GP_USB_HOTPLUG_MATCH_VENDOR_ID
+ flags = (GP_USB_HOTPLUG_MATCH_VENDOR_ID
| GP_USB_HOTPLUG_MATCH_PRODUCT_ID);
usb_vendor = a->usb_vendor;
usb_product = a->usb_product;
@@ -866,7 +866,7 @@ ddb_list_out_func(const char *str, void *data)
static void
-ddb_delayed_head(const func_params_t *params,
+ddb_delayed_head(const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -894,7 +894,7 @@ ddb_delayed_head(const func_params_t *params,
printf(" operations");
first = 1;
- gpi_flags_to_string_list(a->operations,
+ gpi_flags_to_string_list(a->operations,
gpi_camera_operation_map,
ddb_list_out_func,
(void *) &first);
@@ -902,7 +902,7 @@ ddb_delayed_head(const func_params_t *params,
printf(" file_operations");
first = 1;
- gpi_flags_to_string_list(a->file_operations,
+ gpi_flags_to_string_list(a->file_operations,
gpi_file_operation_map,
ddb_list_out_func,
(void *) &first);
@@ -910,7 +910,7 @@ ddb_delayed_head(const func_params_t *params,
printf(" folder_operations");
first = 1;
- gpi_flags_to_string_list(a->folder_operations,
+ gpi_flags_to_string_list(a->folder_operations,
gpi_folder_operation_map,
ddb_list_out_func,
(void *) &first);
@@ -919,7 +919,7 @@ ddb_delayed_head(const func_params_t *params,
static int
-ddb_camera_func (const func_params_t *params,
+ddb_camera_func (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -943,7 +943,7 @@ ddb_camera_func (const func_params_t *params,
if (a->speed[0] != 0) {
unsigned int i;
printf(" speeds");
- for (i=0;
+ for (i=0;
((i < (sizeof(a->speed)/sizeof(a->speed[0]))) &&
(a->speed[i] != 0)); i++) {
printf("%s %d", (first)?"":",", a->speed[i]);
@@ -955,7 +955,7 @@ ddb_camera_func (const func_params_t *params,
}
if ((a->port & GP_PORT_USB)) {
- if (a->usb_vendor) {
+ if (a->usb_vendor) {
/* usb product id may have the legal value zero! */
DELAYED_HEAD();
printf(" interface usb {\n");
@@ -1002,7 +1002,7 @@ ddb_camera_func (const func_params_t *params,
/* print_fdi_map
*
- * Print FDI Device Information file for HAL with information on
+ * Print FDI Device Information file for HAL with information on
* all cams supported by our instance of libgphoto2.
*
* For specs, look around on http://freedesktop.org/ and search
@@ -1026,7 +1026,7 @@ fdi_begin_func (const func_params_t *params, void **data)
static int
-fdi_camera_func (const func_params_t *params,
+fdi_camera_func (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -1072,7 +1072,7 @@ fdi_camera_func (const func_params_t *params,
printf(" <addset key=\"info.capabilities\" type=\"strlist\">portable_audio_player</addset>\n");
printf(" <merge key=\"portable_audio_player.access_method\" type=\"string\">user</merge>\n");
printf(" <merge key=\"portable_audio_player.type\" type=\"string\">mtp</merge>\n");
-
+
/* FIXME: needs true formats ... But all of them can do MP3 */
printf(" <append key=\"portable_audio_player.output_formats\" type=\"strlist\">audio/mpeg</append>\n");
} else {
@@ -1095,7 +1095,7 @@ fdi_camera_func (const func_params_t *params,
}
printf(" </match>\n");
printf(" </match>\n");
-
+
} else if ((a->usb_class) && (a->usb_class != 666)) {
printf(" <match key=\"usb.interface.class\" int=\"%d\">\n", a->usb_class);
printf(" <match key=\"usb.interface.subclass\" int=\"%d\">\n", a->usb_subclass);
@@ -1134,7 +1134,7 @@ fdi_end_func (const func_params_t *params, void *data)
/* print_fdi_device_map
*
- * Print FDI Device Information file for HAL with information on
+ * Print FDI Device Information file for HAL with information on
* all cams supported by our instance of libgphoto2.
*
* For specs, look around on http://freedesktop.org/ and search
@@ -1158,7 +1158,7 @@ fdi_device_begin_func (const func_params_t *params, void **data)
static int
-fdi_device_camera_func (const func_params_t *params,
+fdi_device_camera_func (const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -1322,7 +1322,7 @@ escape_html(const char *str) {
static int
html_camera_func (
- const func_params_t *params,
+ const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -1400,7 +1400,7 @@ static int html_middle_func (
static int
html_camera2_func (
- const func_params_t *params,
+ const func_params_t *params,
const int i,
const int total,
const CameraAbilities *a,
@@ -1436,8 +1436,8 @@ debug_func (GPLogLevel level, const char *domain, const char *str,
{
struct timeval tv;
gettimeofday (&tv,NULL);
- fprintf (stderr, "%li.%06li %s(%i): %s\n",
- (long) (tv.tv_sec - glob_tv_zero.tv_sec),
+ fprintf (stderr, "%li.%06li %s(%i): %s\n",
+ (long) (tv.tv_sec - glob_tv_zero.tv_sec),
(1000000L + tv.tv_usec - glob_tv_zero.tv_usec) % 1000000L,
domain, level, str);
}
@@ -1457,8 +1457,8 @@ typedef struct {
static int
-iterate_camera_list (const int add_comments,
- const output_format_t *format,
+iterate_camera_list (const int add_comments,
+ const output_format_t *format,
string_array_p argv)
{
int number_of_cameras;
@@ -1579,7 +1579,7 @@ static const output_format_t formats[] = {
" is to use udev-extras for dynamic access permissions.\n"
" Available versions of the rule generator: 0.98, 136, 175, 201.\n",
"[script <PATH_TO_SCRIPT>|version <version>|mode <mode>|owner <owner>|group <group>]*",
- udev_begin_func,
+ udev_begin_func,
udev_camera_func,
udev_middle_func,
udev_camera_func2,
@@ -1609,7 +1609,7 @@ static const output_format_t formats[] = {
"list of IDs and names",
"grep for an ID to find the device name",
NULL,
- empty_begin_func,
+ empty_begin_func,
idlist_camera_func,
NULL,
NULL,
@@ -1640,12 +1640,12 @@ static int print_format_list(const output_format_t *formats)
printf("List of output formats:\n");
for (i=0; formats[i].name != NULL; ++i) {
if (formats[i].paramdescr != NULL) {
- printf(" %s %s\n %s\n",
+ printf(" %s %s\n %s\n",
formats[i].name,
formats[i].paramdescr,
formats[i].descr);
} else {
- printf(" %s\n %s\n",
+ printf(" %s\n %s\n",
formats[i].name, formats[i].descr);
}
if (formats[i].help != NULL) {
@@ -1721,14 +1721,14 @@ int main(int argc, char *argv[])
}
format_index++;
}
- if ((formats[format_index].name == NULL) ||
+ if ((formats[format_index].name == NULL) ||
(strcmp(formats[format_index].name, format_name) != 0)) {
return print_help();
}
/* copy remaining arguments */
- for (j=i;
- (j<argc) && ((j-i)<(int)((sizeof(fmt_argv)/sizeof(fmt_argv[0]))-1));
+ for (j=i;
+ (j<argc) && ((j-i)<(int)((sizeof(fmt_argv)/sizeof(fmt_argv[0]))-1));
j++) {
fmt_argv[j-i] = argv[j];
}
diff --git a/tests/ddb/ddb-common.c b/tests/ddb/ddb-common.c
index 955a0bda0..155da6958 100644
--- a/tests/ddb/ddb-common.c
+++ b/tests/ddb/ddb-common.c
@@ -8,10 +8,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
diff --git a/tests/ddb/ddb-common.h b/tests/ddb/ddb-common.h
index 075757a5e..dbb779271 100644
--- a/tests/ddb/ddb-common.h
+++ b/tests/ddb/ddb-common.h
@@ -8,10 +8,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -36,7 +36,7 @@ typedef union {
extern int yylineno;
void
-yyerror (const char *filename, CameraAbilitiesList *al,
+yyerror (const char *filename, CameraAbilitiesList *al,
const char *str);
int
diff --git a/tests/ddb/test-ddb.c b/tests/ddb/test-ddb.c
index b07caa629..72ba73c60 100644
--- a/tests/ddb/test-ddb.c
+++ b/tests/ddb/test-ddb.c
@@ -8,10 +8,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -30,7 +30,7 @@
#include "ddb-txt.tab.h"
static int
-compare_camera_abilities(const CameraAbilities *a,
+compare_camera_abilities(const CameraAbilities *a,
const CameraAbilities *b);
CameraAbilitiesList *
@@ -182,7 +182,7 @@ strcmp_colon(const char *a, const char *b)
static int
-compare_camera_abilities(const CameraAbilities *a,
+compare_camera_abilities(const CameraAbilities *a,
const CameraAbilities *b)
{
unsigned int errors = 0;
diff --git a/tests/test-camera-list.c b/tests/test-camera-list.c
index 6a21e86f9..fd0da7fc3 100644
--- a/tests/test-camera-list.c
+++ b/tests/test-camera-list.c
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -97,7 +97,7 @@ path_basename (const char *pathname)
char *result, *tmp;
/* remove path part from camlib name */
for (result=tmp=(char *)pathname; (*tmp!='\0'); tmp++) {
- if ((*tmp == gp_system_dir_delim)
+ if ((*tmp == gp_system_dir_delim)
&& (*(tmp+1) != '\0')) {
result = tmp+1;
}
@@ -115,7 +115,7 @@ typedef enum {
/* Text table without headers. */
FMT_FLAT_TEXT,
/* Text table just of camlibs without headers,
- * which will contain duplicate lines!
+ * which will contain duplicate lines!
* Treat the output with | sort | uniq to get meaningful results.
*/
FMT_FLAT_CAMLIBS,
@@ -173,7 +173,7 @@ parse_command_line (const int argc, char *argv[])
}
-/**
+/**
* Get list of supported cameras, walk through it and create some output.
*/
int
@@ -215,7 +215,7 @@ main (int argc, char *argv[])
}
- /* Set output format for file body,
+ /* Set output format for file body,
* and print opening part of output file. */
switch (format) {
case FMT_CSV:
@@ -233,7 +233,7 @@ main (int argc, char *argv[])
" <driver-name value=\"%3$s\"/>\n"
" </camera>\n";
printf("<?xml version=\"%s\" encoding=\"%s\"?>\n"
- "<camera-list camera-count=\"%d\">\n",
+ "<camera-list camera-count=\"%d\">\n",
"1.0", "us-ascii", count);
break;
case FMT_FLAT_CAMLIBS:
@@ -246,7 +246,7 @@ main (int argc, char *argv[])
}
strcpy(lastmodel,"xxx");
- /* For each camera in the list, add a text snippet to the
+ /* For each camera in the list, add a text snippet to the
* output file. */
for (i = 0; i < count; i++) {
CameraAbilities abilities;
@@ -262,7 +262,7 @@ main (int argc, char *argv[])
switch (format) {
case FMT_HEADED_TEXT:
- if ( ((i%25)== 0) &&
+ if ( ((i%25)== 0) &&
( (i==0) || ((count-i) > 5) ) ) {
print_hline();
print_headline();
@@ -282,7 +282,7 @@ main (int argc, char *argv[])
}
printf(fmt_str,
- i+1,
+ i+1,
camlib_basename,
abilities.id,
abilities.model);
@@ -307,7 +307,7 @@ main (int argc, char *argv[])
case FMT_COUNT:
break;
}
-
+
CHECK (gp_abilities_list_free (al));
gp_log_remove_func (logid);
return (0);
diff --git a/tests/test-endian.c b/tests/test-endian.c
index f186a6762..53c06d2b7 100644
--- a/tests/test-endian.c
+++ b/tests/test-endian.c
@@ -8,10 +8,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
diff --git a/tests/test-filesys.c b/tests/test-filesys.c
index a420c0c23..aef4fc0b3 100644
--- a/tests/test-filesys.c
+++ b/tests/test-filesys.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
@@ -55,9 +55,9 @@ error_func (GPContext __unused__ *context, const char *str, void __unused__ *dat
}
static int
-set_info_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder,
+set_info_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder,
const char __unused__ *file,
- CameraFileInfo __unused__ info, void __unused__ *data,
+ CameraFileInfo __unused__ info, void __unused__ *data,
GPContext __unused__ *context)
{
printf (" -> The camera will set the file info here.\n");
@@ -66,7 +66,7 @@ set_info_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder,
}
static int
-get_info_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder,
+get_info_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder,
const char *file,
CameraFileInfo *info, void __unused__ *data, GPContext __unused__ *context)
{
@@ -78,7 +78,7 @@ get_info_func (CameraFilesystem __unused__ *fs, const char __unused__ *folder,
}
static int
-file_list_func (CameraFilesystem __unused__ *fs, const char *folder,
+file_list_func (CameraFilesystem __unused__ *fs, const char *folder,
CameraList *list,
void __unused__ *data, GPContext __unused__ *context)
{
@@ -97,11 +97,11 @@ file_list_func (CameraFilesystem __unused__ *fs, const char *folder,
}
static int
-folder_list_func (CameraFilesystem __unused__ *fs, const char *folder,
+folder_list_func (CameraFilesystem __unused__ *fs, const char *folder,
CameraList *list,
void __unused__ *data, GPContext __unused__ *context)
{
- printf ("### -> The camera will list the folders in '%s' here.\n",
+ printf ("### -> The camera will list the folders in '%s' here.\n",
folder);
if (!strcmp (folder, "/")) {
@@ -122,7 +122,7 @@ folder_list_func (CameraFilesystem __unused__ *fs, const char *folder,
}
static int
-delete_file_func (CameraFilesystem __unused__ *fs, const char *folder,
+delete_file_func (CameraFilesystem __unused__ *fs, const char *folder,
const char *file,
void __unused__ *data, GPContext __unused__ *context)
{
diff --git a/tests/test-gphoto2.c b/tests/test-gphoto2.c
index 797cdc193..1706f7878 100644
--- a/tests/test-gphoto2.c
+++ b/tests/test-gphoto2.c
@@ -7,10 +7,10 @@
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the