diff options
author | Siim Meerits <sh0@yutani.ee> | 2020-07-27 17:37:00 +0300 |
---|---|---|
committer | Siim Meerits <sh0@yutani.ee> | 2020-07-27 17:37:00 +0300 |
commit | 456a1d598bccc260b233d2e91c469be452e0fbef (patch) | |
tree | c1288655494c94292f6e2eb26d722958899c7107 /camlibs/sierra | |
parent | af2c0e0558e78cae06371abef36f43ca74a9c5c0 (diff) | |
download | libgphoto2-456a1d598bccc260b233d2e91c469be452e0fbef.tar.gz |
Remove trailing whitespace from all *.h and *.c files.
Diffstat (limited to 'camlibs/sierra')
-rw-r--r-- | camlibs/sierra/epson-desc.c | 50 | ||||
-rw-r--r-- | camlibs/sierra/library.c | 86 | ||||
-rw-r--r-- | camlibs/sierra/library.h | 12 | ||||
-rw-r--r-- | camlibs/sierra/nikon-desc.c | 152 | ||||
-rw-r--r-- | camlibs/sierra/olympus-desc.c | 208 | ||||
-rw-r--r-- | camlibs/sierra/sierra-desc.c | 48 | ||||
-rw-r--r-- | camlibs/sierra/sierra-desc.h | 12 | ||||
-rw-r--r-- | camlibs/sierra/sierra-usbwrap.c | 22 | ||||
-rw-r--r-- | camlibs/sierra/sierra-usbwrap.h | 6 | ||||
-rw-r--r-- | camlibs/sierra/sierra.c | 118 | ||||
-rw-r--r-- | camlibs/sierra/sierra.h | 6 |
11 files changed, 360 insertions, 360 deletions
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 = ®_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 |