summaryrefslogtreecommitdiff
path: root/camlibs/ax203
diff options
context:
space:
mode:
authorSiim Meerits <sh0@yutani.ee>2020-07-27 17:37:00 +0300
committerSiim Meerits <sh0@yutani.ee>2020-07-27 17:37:00 +0300
commit456a1d598bccc260b233d2e91c469be452e0fbef (patch)
treec1288655494c94292f6e2eb26d722958899c7107 /camlibs/ax203
parentaf2c0e0558e78cae06371abef36f43ca74a9c5c0 (diff)
downloadlibgphoto2-456a1d598bccc260b233d2e91c469be452e0fbef.tar.gz
Remove trailing whitespace from all *.h and *.c files.
Diffstat (limited to 'camlibs/ax203')
-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
10 files changed, 50 insertions, 50 deletions
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: