summaryrefslogtreecommitdiff
path: root/libgphoto2
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 /libgphoto2
parentaf2c0e0558e78cae06371abef36f43ca74a9c5c0 (diff)
downloadlibgphoto2-456a1d598bccc260b233d2e91c469be452e0fbef.tar.gz
Remove trailing whitespace from all *.h and *.c files.
Diffstat (limited to 'libgphoto2')
-rw-r--r--libgphoto2/ahd_bayer.c238
-rw-r--r--libgphoto2/bayer.c16
-rw-r--r--libgphoto2/bayer.h14
-rw-r--r--libgphoto2/exif.c2
-rw-r--r--libgphoto2/exif.h2
-rw-r--r--libgphoto2/gamma.c10
-rw-r--r--libgphoto2/gamma.h8
-rw-r--r--libgphoto2/gphoto2-abilities-list.c24
-rw-r--r--libgphoto2/gphoto2-camera.c68
-rw-r--r--libgphoto2/gphoto2-context.c14
-rw-r--r--libgphoto2/gphoto2-file.c28
-rw-r--r--libgphoto2/gphoto2-filesys.c12
-rw-r--r--libgphoto2/gphoto2-library.c12
-rw-r--r--libgphoto2/gphoto2-list.c10
-rw-r--r--libgphoto2/gphoto2-result.c10
-rw-r--r--libgphoto2/gphoto2-setting.c6
-rw-r--r--libgphoto2/gphoto2-version.c6
-rw-r--r--libgphoto2/gphoto2-widget.c92
-rw-r--r--libgphoto2/jpeg.h2
19 files changed, 287 insertions, 287 deletions
diff --git a/libgphoto2/ahd_bayer.c b/libgphoto2/ahd_bayer.c
index 98d44b68a..80117a133 100644
--- a/libgphoto2/ahd_bayer.c
+++ b/libgphoto2/ahd_bayer.c
@@ -1,22 +1,22 @@
/** \file ahd_bayer.c
- *
+ *
* \brief Adaptive Homogeneity-Directed Bayer array conversion routine.
*
* \author Copyright March 12, 2008 Theodore Kilgore <kilgota@auburn.edu>
*
* \par
* gp_ahd_interpolate() from Eero Salminen <esalmine@gmail.com>
- * and Theodore Kilgore. The work of Eero Salminen is for partial completion
- * of a Diploma in Information and Computer Science,
+ * and Theodore Kilgore. The work of Eero Salminen is for partial completion
+ * of a Diploma in Information and Computer Science,
* Helsinki University of Technology, Finland.
*
* \par
* The algorithm is based upon the paper
*
* \par
- * Adaptive Homogeneity-Directed Democsaicing Algorithm,
- * Keigo Hirakawa and Thomas W. Parks, presented in the
- * IEEE Transactions on Image Processing, vol. 14, no. 3, March 2005.
+ * Adaptive Homogeneity-Directed Democsaicing Algorithm,
+ * Keigo Hirakawa and Thomas W. Parks, presented in the
+ * IEEE Transactions on Image Processing, vol. 14, no. 3, March 2005.
*
* \par License
* This library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
-
+
#include <stdio.h>
@@ -60,21 +60,21 @@
static
int dRGB(int i1, int i2, unsigned char *RGB);
static
-int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
+int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
int h, int y, int *pos_code);
static
-int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
+int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
unsigned char *image_v, int w, int h, int y, int *pos_code);
static
-int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
+int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
unsigned char * buffer_h, unsigned char *buffer_v, int w);
#define AD(x, y, w) ((y)*(w)*3+3*(x))
/**
- * \brief This function computes distance^2 between two sets of pixel data.
+ * \brief This function computes distance^2 between two sets of pixel data.
* \param i1 location of a pixel
* \param i2 location of another pixel
- * \param RGB some RGB data.
+ * \param RGB some RGB data.
*/
static
int dRGB(int i1, int i2, unsigned char *RGB) {
@@ -89,39 +89,39 @@ int dRGB(int i1, int i2, unsigned char *RGB) {
* \param image_h three-row window, horizontal interpolation of row 1 is done
* \param image_v three-row window, vertical interpolation of row 1 is done
* \param w width of image
- * \param h height of image.
+ * \param h height of image.
* \param y row number from image which is under construction
* \param pos_code position code related to Bayer tiling in use
*/
static
-int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
- int h, int y, int *pos_code)
+int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
+ int h, int y, int *pos_code)
{
int x, bayer;
int value,value2,div,color;
/*
- * pos_code[0] = red. green lrtb, blue diagonals
- * pos_code[1] = green. red lr, blue tb
- * pos_code[2] = green. blue lr, red tb
- * pos_code[3] = blue. green lrtb, red diagonals
+ * pos_code[0] = red. green lrtb, blue diagonals
+ * pos_code[1] = green. red lr, blue tb
+ * pos_code[2] = green. blue lr, red tb
+ * pos_code[3] = blue. green lrtb, red diagonals
*
* The Red channel reconstruction is R=G+L(Rs-Gs), in which
* G = interpolated & known Green
* Rs = known Red
* Gs = values of G at the positions of Rs
- * L()= should be a 2D lowpass filter, now we'll check
+ * L()= should be a 2D lowpass filter, now we'll check
* them from a 3x3 square
- * L-functions' convolution matrix is
+ * L-functions' convolution matrix is
* [1/4 1/2 1/4;1/2 1 1/2; 1/4 1/2 1/4]
- *
+ *
* The Blue channel reconstruction uses exactly the same methods.
*/
- for (x = 0; x < w; x++)
+ for (x = 0; x < w; x++)
{
bayer = (x&1?0:1) + (y&1?0:2);
for (color=0; color < 3; color+=2) {
- if ((color==RED && bayer == pos_code[3])
- || (color==BLUE
+ if ((color==RED && bayer == pos_code[3])
+ || (color==BLUE
&& bayer == pos_code[0])) {
value=value2=div=0;
if (x > 0 && y > 0) {
@@ -159,8 +159,8 @@ int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
image_v[AD(x,1,w)+color]=
CLAMP(image_v[AD(x,1,w)+GREEN]
+value2/div);
- } else if ((color==RED && bayer == pos_code[2])
- || (color==BLUE
+ } else if ((color==RED && bayer == pos_code[2])
+ || (color==BLUE
&& bayer == pos_code[1])) {
value=value2=div=0;
if (y > 0) {
@@ -185,8 +185,8 @@ int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
CLAMP(
image_v[AD(x,1,w)+GREEN]
+value2/div);
- } else if ((color==RED && bayer == pos_code[1])
- || (color==BLUE
+ } else if ((color==RED && bayer == pos_code[1])
+ || (color==BLUE
&& bayer == pos_code[2])) {
value=value2=div=0;
if (x > 0) {
@@ -224,19 +224,19 @@ int do_rb_ctr_row(unsigned char *image_h, unsigned char *image_v, int w,
* \param image_h three-row window, horizontal interpolation of row 1 is done
* \param image_v three-row window, vertical interpolation of row 1 is done
* \param w width of image
- * \param h height of image.
+ * \param h height of image.
* \param y row number from image which is under construction
* \param pos_code position code related to Bayer tiling in use
*/
static
-int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
+int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
unsigned char *image_v, int w, int h, int y, int *pos_code)
{
int x, bayer;
int value,div;
/*
- * The horizontal green estimation on a red-green row is
+ * The horizontal green estimation on a red-green row is
* G(x) = (2*R(x)+2*G(x+1)+2*G(x-1)-R(x-2)-R(x+2))/4
* The estimation on a green-blue row works in the same
* way.
@@ -254,7 +254,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div+=2;
if (x < (w-1)) {
value += 2*image[AD(x+1,y,w)+GREEN];
- div+=2;
+ div+=2;
}
if (x < (w-2)) {
if (bayer==pos_code[0])
@@ -275,9 +275,9 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div--;
}
image_h[AD(x,1,w)+GREEN] = CLAMP(value / div);
- /* The method for vertical estimation is just like
- * what is done for horizontal estimation, with only
- * the obvious difference that it is done vertically.
+ /* The method for vertical estimation is just like
+ * what is done for horizontal estimation, with only
+ * the obvious difference that it is done vertically.
*/
div=value=0;
if (bayer==pos_code[0])
@@ -287,7 +287,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div+=2;
if (y < (h-1)) {
value += 2*image[AD(x,y+1,w)+GREEN];
- div+=2;
+ div+=2;
}
if (y < (h-2)) {
if (bayer==pos_code[0])
@@ -308,7 +308,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
div--;
}
image_v[AD(x,1,w)+GREEN] = CLAMP(value / div);
-
+
}
}
return GP_OK;
@@ -324,7 +324,7 @@ int do_green_ctr_row(unsigned char *image, unsigned char *image_h,
*/
static
-int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
+int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
unsigned char * buffer_h, unsigned char *buffer_v, int w)
{
int i,j;
@@ -336,23 +336,23 @@ int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
Usize_h=0;
Usize_v=0;
- /*
- * Data collected here for adaptive estimates. First we take
+ /*
+ * Data collected here for adaptive estimates. First we take
* at the given pixel vertical diffs if working in window_v;
* left and right diffs if working in window_h. We then choose
- * of these two diffs as a permissible epsilon-radius within
- * which to work. Checking within this radius, we will
- * compute scores for the various possibilities. The score
- * added in each step is either 1, if the directional change
- * is within the prescribed epsilon, or 0 if it is not.
+ * of these two diffs as a permissible epsilon-radius within
+ * which to work. Checking within this radius, we will
+ * compute scores for the various possibilities. The score
+ * added in each step is either 1, if the directional change
+ * is within the prescribed epsilon, or 0 if it is not.
*/
-
+
RGBeps=MIN(
MAX(dRGB(i,i-3,buffer_h),dRGB(i,i+3,buffer_h)),
MAX(dRGB(i,i-3*w,buffer_v),dRGB(i,i+3*w,buffer_v))
);
/*
- * The scores for the homogeneity mapping. These will be used
+ * The scores for the homogeneity mapping. These will be used
* in the choice algorithm to choose the best value.
*/
@@ -387,35 +387,35 @@ int get_diffs_row2(unsigned char * hom_buffer_h, unsigned char *hom_buffer_v,
* \param tile how the 2x2 bayer array is laid out
*
* This function interpolates a bayer array which has been pre-expanded
- * by gp_bayer_expand() to an RGB image. It applies the method of adaptive
- * homogeneity-directed demosaicing.
+ * by gp_bayer_expand() to an RGB image. It applies the method of adaptive
+ * homogeneity-directed demosaicing.
*
* \return a gphoto error code
*
* \par
- * In outline, the interpolation algorithm used here does the
+ * In outline, the interpolation algorithm used here does the
* following:
*
* \par
- * In principle, the first thing which is done is to split off from the
- * image two copies. In one of these, interpolation will be done in the
- * vertical direction only, and in the other copy only in the
- * horizontal direction. "Cross-color" data is used throughout, on the
- * principle that it can be used as a corrector for brightness even if it is
- * derived from the "wrong" color. Finally, at each pixel there is a choice
- * criterion to decide whether to use the result of the vertical
- * interpolation, the horizontal interpolation, or an average of the two.
+ * In principle, the first thing which is done is to split off from the
+ * image two copies. In one of these, interpolation will be done in the
+ * vertical direction only, and in the other copy only in the
+ * horizontal direction. "Cross-color" data is used throughout, on the
+ * principle that it can be used as a corrector for brightness even if it is
+ * derived from the "wrong" color. Finally, at each pixel there is a choice
+ * criterion to decide whether to use the result of the vertical
+ * interpolation, the horizontal interpolation, or an average of the two.
*
* \par
- * Memory use and speed are optimized by using two sliding windows, one
- * for the vertical interpolation and the other for the horizontal
- * interpolation instead of using two copies of the entire input image. The
+ * Memory use and speed are optimized by using two sliding windows, one
+ * for the vertical interpolation and the other for the horizontal
+ * interpolation instead of using two copies of the entire input image. The
* nterpolation and the choice algorithm are then implemented entirely within
* these windows, too. When this has been done, a completed row is written back
- * to the image. Then the windows are moved, and the process repeats.
+ * to the image. Then the windows are moved, and the process repeats.
*/
-int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
+int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
{
int i, j, k, x, y;
int p[4];
@@ -460,53 +460,53 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
break;
}
- /*
- * Once the algorithm is initialized and running, one cycle of the
+ /*
+ * Once the algorithm is initialized and running, one cycle of the
* algorithm can be described thus:
- *
+ *
* Step 1
- * Write from row y+3 of the image to row 5 in window_v and in
- * window_h.
+ * Write from row y+3 of the image to row 5 in window_v and in
+ * window_h.
*
* Step 2
* Interpolate missing green data on row 5 in each window. Data from
- * the image only is needed for this, not data from the windows.
+ * the image only is needed for this, not data from the windows.
*
* Step 3
- * Now interpolate the missing red or blue data on row 4 in both
- * windows. We need to do this inside the windows; what is required
- * is the real or interpolated green data from rows 3 and 5, and the
- * real data on rows 3 and 5 about the color being interpolated on
- * row 4, so all of this information is available in the two windows.
- * Note that for this operation we are interpolating the center row
- * of cur_window_v and cur_window_h.
- *
+ * Now interpolate the missing red or blue data on row 4 in both
+ * windows. We need to do this inside the windows; what is required
+ * is the real or interpolated green data from rows 3 and 5, and the
+ * real data on rows 3 and 5 about the color being interpolated on
+ * row 4, so all of this information is available in the two windows.
+ * Note that for this operation we are interpolating the center row
+ * of cur_window_v and cur_window_h.
+ *
* Step 4
* Now we have five completed rows in each window, 0 through 4 (rows
- * 0 - 3 having been done in previous cycles). Completed rows 0 - 4
- * are what is required in order to run the choice algorithm at
- * each pixel location across row 2, to decide whether to choose the
- * data for that pixel from window_v or from window_h. We run the
- * choice algorithm, sending the data from row 2 over to row y of the
- * image, pixel by pixel.
+ * 0 - 3 having been done in previous cycles). Completed rows 0 - 4
+ * are what is required in order to run the choice algorithm at
+ * each pixel location across row 2, to decide whether to choose the
+ * data for that pixel from window_v or from window_h. We run the
+ * choice algorithm, sending the data from row 2 over to row y of the
+ * image, pixel by pixel.
*
* Step 5
* Move the windows down (or the data in them up) by one row.
* Increment y, the row counter for the image. Go to Step 1.
- *
- * Initialization of the algorithm clearly requires some special
- * steps, which are described below as they occur.
+ *
+ * Initialization of the algorithm clearly requires some special
+ * steps, which are described below as they occur.
*/
- cur_window_h = window_h+9*w;
- cur_window_v = window_v+9*w;
+ cur_window_h = window_h+9*w;
+ cur_window_v = window_v+9*w;
/*
* Getting started. Copy row 0 from image to line 4 of windows
- * and row 1 from image to line 5 of windows.
+ * and row 1 from image to line 5 of windows.
*/
memcpy (window_h+12*w, image, 6*w);
memcpy (window_v+12*w, image, 6*w);
/*
- * Now do the green interpolation in row 4 of the windows, the
+ * Now do the green interpolation in row 4 of the windows, the
* "center" row of cur_window_v and _h, with the help of image row 0
* and image row 1.
*/
@@ -514,38 +514,38 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
/* this does the green interpolation in row 5 of the windows */
do_green_ctr_row(image, cur_window_h+3*w, cur_window_v+3*w, w, h, 1, p);
/*
- * we are now ready to do the rb interpolation on row 4 of the
- * windows, which relates to row 0 of the image.
- */
+ * we are now ready to do the rb interpolation on row 4 of the
+ * windows, which relates to row 0 of the image.
+ */
do_rb_ctr_row(cur_window_h, cur_window_v, w, h, 0, p);
/*
* Row row 4, which will be mapped to image row 0, is finished in both
- * windows. Row 5 has had only the green interpolation.
+ * windows. Row 5 has had only the green interpolation.
*/
memmove(window_h, window_h+3*w,15*w);
memmove(window_v, window_v+3*w,15*w);
memcpy (window_h+15*w, image+6*w, 3*w);
memcpy (window_v+15*w, image+6*w, 3*w);
/*
- * now we have shifted backwards and we have row 0 of the image in
+ * now we have shifted backwards and we have row 0 of the image in
* row 3 of the windows. Row 4 of the window contains row 1 of image
- * and needs the rb interpolation. We have copied row 2 of the image
- * into row 5 of the windows and need to do green interpolation.
+ * and needs the rb interpolation. We have copied row 2 of the image
+ * into row 5 of the windows and need to do green interpolation.
*/
do_green_ctr_row(image, cur_window_h+3*w, cur_window_v+3*w, w, h, 2, p);
do_rb_ctr_row(cur_window_h, cur_window_v, w, h, 1, p);
memmove (window_h, window_h+3*w, 15*w);
- memmove(window_v, window_v+3*w,15*w);
+ memmove(window_v, window_v+3*w,15*w);
/*
- * We have shifted one more time. Row 2 of the two windows is
- * the original row 0 of the image, now fully interpolated. Rows 3
- * and 4 of the windows contain the original rows 1 and 2 of the
- * image, also fully interpolated. They will be used while applying
+ * We have shifted one more time. Row 2 of the two windows is
+ * the original row 0 of the image, now fully interpolated. Rows 3
+ * and 4 of the windows contain the original rows 1 and 2 of the
+ * image, also fully interpolated. They will be used while applying
* the choice algorithm on row 2, in order to write it back to row
- * 0 of the image. The algorithm is now fully initialized. We enter
+ * 0 of the image. The algorithm is now fully initialized. We enter
* the loop which will complete the algorithm for the whole image.
*/
-
+
for (y = 0; y < h; y++) {
if(y<h-3) {
memcpy (window_v+15*w,image+3*y*w+9*w, 3*w);
@@ -554,16 +554,16 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
memset(window_v+15*w, 0, 3*w);
memset(window_h+15*w, 0, 3*w);
}
- if (y<h-3)
- do_green_ctr_row(image, cur_window_h+3*w,
+ if (y<h-3)
+ do_green_ctr_row(image, cur_window_h+3*w,
cur_window_v+3*w, w, h, y+3, p);
- if (y<h-2)
+ if (y<h-2)
do_rb_ctr_row(cur_window_h, cur_window_v, w, h, y+2, p);
/*
- * The next function writes row 2 of diffs, which is the set of
- * diff scores for row y+1 of the image, which is row 3 of our
+ * The next function writes row 2 of diffs, which is the set of
+ * diff scores for row y+1 of the image, which is row 3 of our
* windows. When starting with row 0 of the image, this is all
- * we need. As we continue, the results of this calculation
+ * we need. As we continue, the results of this calculation
* will also be rotated; in general we need the diffs for rows
* y-1, y, and y+1 in order to carry out the choice algorithm
* for writing row y.
@@ -572,15 +572,15 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
memset(homo_ch, 0, w);
memset(homo_cv, 0, w);
- /* The choice algorithm now will use the sum of the nine diff
- * scores computed at the pixel location and at its eight
- * nearest neighbors. The direction with highest score will
- * be used; if the scores are equal an average is used.
+ /* The choice algorithm now will use the sum of the nine diff
+ * scores computed at the pixel location and at its eight
+ * nearest neighbors. The direction with highest score will
+ * be used; if the scores are equal an average is used.
*/
for (x=0; x < w; x++) {
for (i=-1; i < 2;i++) {
for (k=0; k < 3;k++) {
- j=i+x+w*k;
+ j=i+x+w*k;
if ((j >= 0) && ( j < w*3)) {
homo_ch[x]+=homo_h[j];
homo_cv[x]+=homo_v[j];
@@ -629,10 +629,10 @@ int gp_ahd_interpolate (unsigned char *image, int w, int h, BayerTile tile)
* 2x2 RGB pixel set out of this data.
*
* This function expands and interpolates the bayer array to 3 times larger
- * bitmap with RGB values interpolated. It does the same job as
+ * bitmap with RGB values interpolated. It does the same job as
* gp_bayer_decode() but it calls gp_ahd_interpolate() instead of calling
- * gp_bayer_interpolate(). Use this instead of gp_bayer_decode() if you
- * want to use or to test AHD interpolation in a camera library.
+ * gp_bayer_interpolate(). Use this instead of gp_bayer_decode() if you
+ * want to use or to test AHD interpolation in a camera library.
* \return a gphoto error code
*/
diff --git a/libgphoto2/bayer.c b/libgphoto2/bayer.c
index 48537c057..12da20fbc 100644
--- a/libgphoto2/bayer.c
+++ b/libgphoto2/bayer.c
@@ -68,7 +68,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
* This function expands the bayer array to 3 times larger bitmap with
* RGB values copied as-is. Pixels were no sensor was there are 0.
* The data is supposed to be processed further by for instance gp_bayer_interpolate().
- *
+ *
* \return a gphoto error code
*/
int
@@ -113,7 +113,7 @@ gp_bayer_expand (unsigned char *input, int w, int h, unsigned char *output,
bayer = (x&1?0:1) + (y&1?0:2);
colour = tile_colours[tile][bayer];
-
+
i = (y * w + x) * 3;
output[i+RED] = 0;
@@ -251,7 +251,7 @@ gp_bayer_interpolate (unsigned char *image, int w, int h, BayerTile tile)
}
/**
* \brief interpolate one pixel from a bayer 2x2 raster
- *
+ *
* For red and blue data, compare the four surrounding values. If three
* values are all one side of the mean value, the fourth value is ignored.
* This will sharpen boundaries. Treatment of green data looks for vertical and
@@ -272,7 +272,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
int i ;
x[0] = x0 ; x[1] = x1 ; x[2] = x2 ; x[3] = x3 ;
y[0] = y0 ; y[1] = y1 ; y[2] = y2 ; y[3] = y3 ;
-
+
/* special treatment for green */
counter = sum_of_values = 0 ;
if(colour == GREEN)
@@ -282,7 +282,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
* interpolation procedure. Therefore, we determine whether
* we might have such a line structure.
*/
-
+
for (i = 0 ; i < 4 ; i++)
{ if ((x[i] >= 0) && (x[i] < w) && (y[i] >= 0) && (y[i] < h))
{
@@ -295,7 +295,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
}
}
if(counter == 4)
- {
+ {
/* It is assumed that x0,y0 and x1,y1 are on a
* horizontal line and
* x2,y2 and x3,y3 are on a vertical line
@@ -321,7 +321,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
/* if we do not have four points then we proceed as we do for
* blue and red */
}
-
+
/* for blue and red */
counter = sum_of_values = 0 ;
for (i = 0 ; i < 4 ; i++)
@@ -364,7 +364,7 @@ gp_bayer_accrue (unsigned char *image, int w, int h, int x0, int y0,
*
* This function expands and interpolates the bayer array to 3 times larger
* bitmap with RGB values interpolated.
- *
+ *
* \return a gphoto error code
*/
int
diff --git a/libgphoto2/bayer.h b/libgphoto2/bayer.h
index ad96e1b29..f406ea6a4 100644
--- a/libgphoto2/bayer.h
+++ b/libgphoto2/bayer.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -26,7 +26,7 @@
/**
* \brief how the bayer CCD array is laid out
- *
+ *
* This enumeration defines how the CCD bayer array is laid out.
*/
typedef enum {
@@ -47,9 +47,9 @@ int gp_bayer_decode (unsigned char *input, int w, int h, unsigned char *output,
int gp_bayer_interpolate (unsigned char *image, int w, int h, BayerTile tile);
/*
* The following two functions use an alternative procedure called Adaptive
- * Homogeneity-directed demosaicing instead of the standard bilinear
- * interpolation with basic edge-detection method used in the previous two
- * functions. To use or test this method of Bayer interpolation, just use
+ * Homogeneity-directed demosaicing instead of the standard bilinear
+ * interpolation with basic edge-detection method used in the previous two
+ * functions. To use or test this method of Bayer interpolation, just use
* gp_ahd_decode() in the same way and in the same place as gp_bayer_decode()
* is used.
*/
diff --git a/libgphoto2/exif.c b/libgphoto2/exif.c
index cd5795909..2297edab7 100644
--- a/libgphoto2/exif.c
+++ b/libgphoto2/exif.c
@@ -31,7 +31,7 @@
/*
* Gets the thumbnail of an EXIF image.
* The thumbnail size is provided
- *
+ *
* No longer provided, use libexif directly please.
*/
unsigned char *gpi_exif_get_thumbnail_and_size(void *exifdat, long *size) { return NULL; }
diff --git a/libgphoto2/exif.h b/libgphoto2/exif.h
index ac8587e75..9032f5201 100644
--- a/libgphoto2/exif.h
+++ b/libgphoto2/exif.h
@@ -10,7 +10,7 @@
*/
#ifndef _gphoto_exif_
-#define _gphoto_exif_
+#define _gphoto_exif_
/*
* Not used anymore, use libexif if necessary.
diff --git a/libgphoto2/gamma.c b/libgphoto2/gamma.c
index a3607f8c2..c4a970ffe 100644
--- a/libgphoto2/gamma.c
+++ b/libgphoto2/gamma.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -50,7 +50,7 @@ gp_gamma_correct_triple (unsigned char *table_red,
*
* Corrects size pixels within the table with a given Gamma
* correction table.
- *
+ *
* \param table the gamma correction table as generated by gp_gamma_fill_table()
* \param data the data do process, both input and output
* \param size in number of pixels (RGB byte pairs)
@@ -66,7 +66,7 @@ gp_gamma_correct_single (unsigned char *table, unsigned char *data,
/**
* \brief Initialize a Gamma conversion table
- *
+ *
* Initializes the gamma conversion table for later use by gp_gamma_correct_single().
* Requires a 256 byte array as table.
* \param table a 256 byte array of unsigned char
diff --git a/libgphoto2/gamma.h b/libgphoto2/gamma.h
index b03a97dd6..0d963cbf1 100644
--- a/libgphoto2/gamma.h
+++ b/libgphoto2/gamma.h
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -25,7 +25,7 @@
#define __GAMMA_H__
int gp_gamma_fill_table (unsigned char *table, double g);
-int gp_gamma_correct_single (unsigned char *table, unsigned char *data,
+int gp_gamma_correct_single (unsigned char *table, unsigned char *data,
unsigned int data_size);
#endif /* __GAMMA_H__ */
diff --git a/libgphoto2/gphoto2-abilities-list.c b/libgphoto2/gphoto2-abilities-list.c
index 67249a194..09364d56e 100644
--- a/libgphoto2/gphoto2-abilities-list.c
+++ b/libgphoto2/gphoto2-abilities-list.c
@@ -10,10 +10,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -77,7 +77,7 @@ static int gp_abilities_list_sort (CameraAbilitiesList *);
* \param codeset New codeset for the messages. For instance "utf-8".
* \return old codeset as returned from bind_textdomain_codeset().
*
- * You would then call gp_abilities_list_load() in order to
+ * You would then call gp_abilities_list_load() in order to
* populate it.
*/
const char*
@@ -94,7 +94,7 @@ gp_message_codeset (const char *codeset)
* \param list CameraAbilitiesList object to initialize
* \return gphoto2 error code
*
- * You would then call gp_abilities_list_load() in order to
+ * You would then call gp_abilities_list_load() in order to
* populate it.
*/
int
@@ -235,7 +235,7 @@ gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir,
if (gp_abilities_list_lookup_id (list, text.text) >= 0) {
lt_dlclose (lh);
continue;
- }
+ }
/* camera_abilities */
ab = lt_dlsym (lh, "camera_abilities");
@@ -259,7 +259,7 @@ gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir,
}
/* do not free the library in valgrind mode */
-#if !defined(VALGRIND)
+#if !defined(VALGRIND)
lt_dlclose (lh);
#endif
@@ -277,7 +277,7 @@ gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir,
if (gp_context_cancel (context) == GP_CONTEXT_FEEDBACK_CANCEL) {
lt_dlexit ();
gp_list_free (flist);
- return (GP_ERROR_CANCEL);
+ return (GP_ERROR_CANCEL);
}
}
gp_context_progress_stop (context, p);
@@ -338,7 +338,7 @@ gp_abilities_list_detect_usb (CameraAbilitiesList *list,
list->abilities[i].model, v, p);
*ability = i;
} else if (res < 0 && res != GP_ERROR_IO_USB_FIND) {
- /* another error occurred.
+ /* another error occurred.
* perhaps we should better
* report this to the calling
* method?
@@ -363,7 +363,7 @@ gp_abilities_list_detect_usb (CameraAbilitiesList *list,
list->abilities[i].model, c, s, p);
*ability = i;
} else if (res < 0 && res != GP_ERROR_IO_USB_FIND) {
- /* another error occurred.
+ /* another error occurred.
* perhaps we should better
* report this to the calling
* method?
@@ -428,7 +428,7 @@ gp_abilities_list_detect (CameraAbilitiesList *list,
case GP_PORT_USB_SCSI:
case GP_PORT_USB_DISK_DIRECT: {
int ability;
-
+
res = gp_abilities_list_detect_usb (list, &ability, port);
if (res == GP_OK) {
gp_list_append(l,
@@ -442,7 +442,7 @@ gp_abilities_list_detect (CameraAbilitiesList *list,
case GP_PORT_DISK: {
char *s, path[1024];
struct stat stbuf;
-
+
s = strchr (xpath, ':');
if (!s)
break;
diff --git a/libgphoto2/gphoto2-camera.c b/libgphoto2/gphoto2-camera.c
index e190c3658..7c2ccbc7e 100644
--- a/libgphoto2/gphoto2-camera.c
+++ b/libgphoto2/gphoto2-camera.c
@@ -12,10 +12,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -107,8 +107,8 @@
* to a 'Reset' signal on the camera. I quote from the Digita 'Host
* Interface Specification' document:
*
- * "The Reset signal is a pulse on the Reset/Att line (which cooresponds
- * [sic] to pin 2 at the camera side) sent from the host computer to the
+ * "The Reset signal is a pulse on the Reset/Att line (which cooresponds
+ * [sic] to pin 2 at the camera side) sent from the host computer to the
* camera. This pulse must be at least 50us."
*/
@@ -254,9 +254,9 @@ struct _CameraPrivateCore {
* Closes a connection to the camera and therefore gives other application
* the possibility to access the camera, too.
*
- * It is recommended that you
+ * It is recommended that you
* call this function when you currently don't need the camera. The camera
- * will get reinitialized by gp_camera_init() automatically if you try to
+ * will get reinitialized by gp_camera_init() automatically if you try to
* access the camera again.
*
*/
@@ -268,7 +268,7 @@ gp_camera_exit (Camera *camera, GPContext *context)
GP_LOG_D ("Exiting camera ('%s')...", camera->pc->a.model);
/*
- * We have to postpone this operation if the camera is currently
+ * We have to postpone this operation if the camera is currently
* in use. gp_camera_exit will be called again if the
* camera->pc->used will drop to zero.
*/
@@ -350,7 +350,7 @@ error:
/**
- * \brief Sets the camera abilities.
+ * \brief Sets the camera abilities.
*
* @param camera a #Camera
* @param abilities the #CameraAbilities to be set
@@ -358,8 +358,8 @@ error:
*
* You need to call this function before calling #gp_camera_init the
* first time unless you want gphoto2 to autodetect cameras and choose
- * the first detected one. By setting the \c abilities, you
- * tell gphoto2 what model the \c camera is and what camera driver should
+ * the first detected one. By setting the \c abilities, you
+ * tell gphoto2 what model the \c camera is and what camera driver should
* be used for accessing the \c camera. You can get \c abilities by calling
* #gp_abilities_list_get_abilities.
*
@@ -385,7 +385,7 @@ gp_camera_set_abilities (Camera *camera, CameraAbilities abilities)
/**
- * Retrieve the \c abilities of the \c camera.
+ * Retrieve the \c abilities of the \c camera.
*
* @param camera a #Camera
* @param abilities
@@ -443,11 +443,11 @@ gp_camera_set_port_info (Camera *camera, GPPortInfo info)
* @param speed the speed
* @return a gphoto2 error code
*
- * This function is typically used prior first initialization
+ * This function is typically used prior first initialization
* using #gp_camera_init for debugging purposes. Normally, a camera driver
* will try to figure out the current speed of the camera and set the speed
- * to the optimal one automatically. Note that this function only works with
- * serial ports. In other words, you have to set the camera's port to a
+ * to the optimal one automatically. Note that this function only works with
+ * serial ports. In other words, you have to set the camera's port to a
* serial one (using #gp_camera_set_port_path or #gp_camera_set_port_name)
* prior calling this function.
*
@@ -480,7 +480,7 @@ gp_camera_set_port_speed (Camera *camera, int speed)
}
-/**
+/**
* Retrieve the current speed.
*
* @param camera a #Camera
@@ -520,7 +520,7 @@ gp_camera_ref (Camera *camera)
* @param camera a #Camera
* @return a gphoto2 error code
*
- * If the reference count reaches %0, the \c camera will be freed
+ * If the reference count reaches %0, the \c camera will be freed
* automatically.
*
*/
@@ -554,7 +554,7 @@ gp_camera_unref (Camera *camera)
* @param camera a #Camera
* @return a gphoto2 error code
*
- * \deprecated
+ * \deprecated
* This function should never be used. Please use #gp_camera_unref instead.
*
*/
@@ -593,7 +593,7 @@ gp_camera_free (Camera *camera)
free (camera->functions);
camera->functions = NULL;
}
-
+
free (camera);
return (GP_OK);
@@ -664,7 +664,7 @@ out:
}
/**
- * Initiate a connection to the \c camera.
+ * Initiate a connection to the \c camera.
*
* @param camera a #Camera
* @param context a #GPContext
@@ -691,7 +691,7 @@ gp_camera_init (Camera *camera, GPContext *context)
C_PARAMS (camera);
/*
- * Reset the exit_requested flag. If this flag is set,
+ * Reset the exit_requested flag. If this flag is set,
* gp_camera_exit will be called as soon as the camera is no
* longer in use (used flag).
*/
@@ -809,7 +809,7 @@ gp_camera_init (Camera *camera, GPContext *context)
lt_dlexit ();
camera->pc->lh = NULL;
gp_context_error (context, _("Camera driver '%s' is "
- "missing the 'camera_init' function."),
+ "missing the 'camera_init' function."),
camera->pc->a.library);
return (GP_ERROR_LIBRARY);
}
@@ -1094,7 +1094,7 @@ gp_camera_list_config (Camera *camera, CameraList *list, GPContext *context)
* @param context a #GPContext
* @return a gphoto2 error code
*
- * Typically, a \c window is retrieved using #gp_camera_get_config and passed
+ * Typically, a \c window is retrieved using #gp_camera_get_config and passed
* to this function in order to adjust the settings on the camera.
*
**/
@@ -1372,8 +1372,8 @@ gp_camera_trigger_capture (Camera *camera, GPContext *context)
}
/**
- * Captures a preview that won't be stored on the camera but returned in
- * supplied file.
+ * Captures a preview that won't be stored on the camera but returned in
+ * supplied file.
*
* @param camera a #Camera
* @param file a #CameraFile
@@ -1429,7 +1429,7 @@ gp_camera_capture_preview (Camera *camera, CameraFile *file, GPContext *context)
* If an event is received then eventtype is set to the type of event, and
* eventdata is set to event specific data. See the CameraEventType enum
* to see which eventtypes match to which types of eventdata.
- *
+ *
* Note that this function will return one event after each other, you need
* to be able to call it multiple times, e.g. in a loop, when waiting for specific
* events.
@@ -1464,7 +1464,7 @@ gp_camera_wait_for_event (Camera *camera, int timeout,
*
**/
int
-gp_camera_folder_list_files (Camera *camera, const char *folder,
+gp_camera_folder_list_files (Camera *camera, const char *folder,
CameraList *list, GPContext *context)
{
GP_LOG_D ("Listing files in '%s'...", folder);
@@ -1492,7 +1492,7 @@ gp_camera_folder_list_files (Camera *camera, const char *folder,
*
**/
int
-gp_camera_folder_list_folders (Camera *camera, const char* folder,
+gp_camera_folder_list_folders (Camera *camera, const char* folder,
CameraList *list, GPContext *context)
{
GP_LOG_D ("Listing folders in '%s'...", folder);
@@ -1575,7 +1575,7 @@ gp_camera_folder_put_file (Camera *camera,
*
**/
int
-gp_camera_file_get_info (Camera *camera, const char *folder,
+gp_camera_file_get_info (Camera *camera, const char *folder,
const char *file, CameraFileInfo *info,
GPContext *context)
{
@@ -1641,7 +1641,7 @@ gp_camera_file_get_info (Camera *camera, const char *folder,
*
**/
int
-gp_camera_file_set_info (Camera *camera, const char *folder,
+gp_camera_file_set_info (Camera *camera, const char *folder,
const char *file, CameraFileInfo info,
GPContext *context)
{
@@ -1667,7 +1667,7 @@ gp_camera_file_set_info (Camera *camera, const char *folder,
* @return a gphoto2 error code
*
**/
-int
+int
gp_camera_file_get (Camera *camera, const char *folder, const char *file,
CameraFileType type, CameraFile *camera_file,
GPContext *context)
@@ -1688,7 +1688,7 @@ gp_camera_file_get (Camera *camera, const char *folder, const char *file,
CAMERA_UNUSED (camera, context);
return (GP_ERROR_FILE_NOT_FOUND);
}
-
+
CHECK_RESULT_OPEN_CLOSE (camera, gp_filesystem_get_file (camera->fs,
folder, file, type, camera_file, context), context);
@@ -1730,7 +1730,7 @@ gp_camera_file_read (Camera *camera, const char *folder, const char *file,
CAMERA_UNUSED (camera, context);
return (GP_ERROR_FILE_NOT_FOUND);
}
-
+
CHECK_RESULT_OPEN_CLOSE (camera, gp_filesystem_read_file (camera->fs,
folder, file, type, offset, buf, size, context), context);
@@ -1923,7 +1923,7 @@ gp_camera_start_timeout (Camera *camera, unsigned int timeout,
* Stop periodic calls to keepalive function.
*
* @param camera a #Camera
- * @param id the id of the background process previously returned by
+ * @param id the id of the background process previously returned by
* #gp_camera_start_timeout
*
* Call this function in the camera driver if you want to stop a periodic
diff --git a/libgphoto2/gphoto2-context.c b/libgphoto2/gphoto2-context.c
index bcd0785b1..2649311a8 100644
--- a/libgphoto2/gphoto2-context.c
+++ b/libgphoto2/gphoto2-context.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -106,7 +106,7 @@ gp_context_free (GPContext *context)
/**
* \brief Decrements reference count of a context.
- *
+ *
* Decrement the reference count of a context and free if it goes to 0.
*
* \param context The context to drop the reference count.
@@ -124,7 +124,7 @@ gp_context_unref (GPContext *context)
/**
* \brief Notify frontend of a brief idle time.
- *
+ *
* Tells the frontend that it can do other processing at this moment, like refresh
* the UI. Backends should call this function every time when an
* interruption of the transfer is possible.
@@ -143,7 +143,7 @@ gp_context_idle (GPContext *context)
/**
* \brief Start progress tracking.
- *
+ *
* This function starts up a new progress tracking for a specified context.
* Several nested progress reports can happen at once, depending on the backend.
*
@@ -246,7 +246,7 @@ gp_context_status (GPContext *context, const char *format, ...)
*
* This sends a message to the passed context, to be printed by
* it in some kind of way, but do no other action.
- *
+ *
* To be used by camera drivers.
*
* \param context A GPContext
diff --git a/libgphoto2/gphoto2-file.c b/libgphoto2/gphoto2-file.c
index af2372418..cdd671f3d 100644
--- a/libgphoto2/gphoto2-file.c
+++ b/libgphoto2/gphoto2-file.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -149,7 +149,7 @@ int gp_file_free (CameraFile *file)
C_PARAMS (file);
CHECK_RESULT (gp_file_clean (file));
-
+
if (file->accesstype == GP_FILE_ACCESSTYPE_FD)
close (file->fd);
@@ -169,7 +169,7 @@ gp_file_ref (CameraFile *file)
C_PARAMS (file);
file->ref_count += 1;
-
+
return (GP_OK);
}
@@ -184,7 +184,7 @@ int
gp_file_unref (CameraFile *file)
{
C_PARAMS (file);
-
+
file->ref_count -= 1;
if (file->ref_count == 0)
@@ -202,7 +202,7 @@ gp_file_unref (CameraFile *file)
*
**/
int
-gp_file_append (CameraFile *file, const char *data,
+gp_file_append (CameraFile *file, const char *data,
unsigned long int size)
{
C_PARAMS (file);
@@ -214,7 +214,7 @@ gp_file_append (CameraFile *file, const char *data,
file->size += size;
break;
case GP_FILE_ACCESSTYPE_FD: {
- unsigned long int curwritten = 0;
+ unsigned long int curwritten = 0;
while (curwritten < size) {
ssize_t res = write (file->fd, data+curwritten, size-curwritten);
if (res == -1) {
@@ -251,7 +251,7 @@ gp_file_append (CameraFile *file, const char *data,
* Internal.
**/
int
-gp_file_slurp (CameraFile *file, char *data,
+gp_file_slurp (CameraFile *file, char *data,
size_t size, size_t *readlen
) {
C_PARAMS (file);
@@ -265,7 +265,7 @@ gp_file_slurp (CameraFile *file, char *data,
if (readlen) *readlen = size;
break;
case GP_FILE_ACCESSTYPE_FD: {
- unsigned long int curread = 0;
+ unsigned long int curread = 0;
while (curread < size) {
ssize_t res = read (file->fd, data+curread, size-curread);
if (res == -1) {
@@ -388,8 +388,8 @@ gp_file_set_data_and_size (CameraFile *file, char *data,
*
* For regular CameraFiles, the pointer to data that is returned is
* still owned by libgphoto2 and its lifetime is the same as the #file.
- *
- * For filedescriptor or handler based CameraFile types, the returned
+ *
+ * For filedescriptor or handler based CameraFile types, the returned
* data pointer is owned by the caller and needs to be free()d to avoid
* memory leaks.
*
@@ -698,7 +698,7 @@ gp_file_open (CameraFile *file, const char *filename)
int
gp_file_clean (CameraFile *file)
{
- /*
+ /*
* Frees a CameraFile's components, not the CameraFile itself.
* This is used to prep a CameraFile struct to be filled.
*/
@@ -1115,7 +1115,7 @@ gp_file_adjust_name_for_mime_type (CameraFile *file)
break;
}
GP_LOG_D ("Name adjusted to '%s'.", file->name);
-
+
return (GP_OK);
}
diff --git a/libgphoto2/gphoto2-filesys.c b/libgphoto2/gphoto2-filesys.c
index 4afbf1613..7f4314093 100644
--- a/libgphoto2/gphoto2-filesys.c
+++ b/libgphoto2/gphoto2-filesys.c
@@ -390,7 +390,7 @@ lookup_folder (
char *copy = strdup (foldername);
int ret;
/*
- * The parent folder is dirty. List the folders in the parent
+ * The parent folder is dirty. List the folders in the parent
* folder to make it clean.
*/
/* the character _before_ curpt is a /, overwrite it temporary with \0 */
@@ -788,7 +788,7 @@ recursive_fs_dump (CameraFilesystemFolder *folder, int depth) {
GP_LOG_D ("%*s %s", depth, " ", xfile->name);
xfile = xfile->next;
}
-
+
f = folder->folders;
while (f) {
recursive_fs_dump (f, depth+4);
@@ -1239,7 +1239,7 @@ gp_filesystem_remove_dir (CameraFilesystem *fs, const char *folder,
CameraList *list;
int ret;
/*
- * The owning folder is dirty. List the folders in it
+ * The owning folder is dirty. List the folders in it
* to make it clean.
*/
GP_LOG_D ("Folder %s is dirty. "
@@ -1750,18 +1750,18 @@ gp_filesystem_get_file (CameraFilesystem *fs, const char *folder,
* \param type the type of the file
* \param offset the offset where the data starts
* \param buf the targetbuffer where the data will be put
- * \param size the size to read and that was read into the buffer
+ * \param size the size to read and that was read into the buffer
* \param context a #GPContext
*
* Downloads the file called filename from the folder using the
* read_file_func if such a function has been previously supplied. If the
* file has been previously downloaded, the file is retrieved from cache.
- *
+ *
* The file is read partially into the passed buffer. The read starts
* at offset on the device and goes for at most size bytes.
* Reading over the end of the file might give errors, so get the maximum
* file size via an info function before.
- *
+ *
* \return a gphoto2 error code.
**/
int
diff --git a/libgphoto2/gphoto2-library.c b/libgphoto2/gphoto2-library.c
index 4e51412a8..b04a4d845 100644
--- a/libgphoto2/gphoto2-library.c
+++ b/libgphoto2/gphoto2-library.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -29,7 +29,7 @@
* \param id a #CameraText that receives the id string
*
* This function should write a unique id into id and return #GP_OK. That is,
- * choose a unique id, use strncpy in order to copy it into the id, and
+ * choose a unique id, use strncpy in order to copy it into the id, and
* return #GP_OK. The driver name should suffice.
*
* \returns a gphoto2 error code
@@ -45,7 +45,7 @@ camera_id (CameraText *id)
* \brief Get a list of abilities of all supported cameras
* \param list a #CameraAbilitiesList
*
- * This function should use #gp_abilities_list_append as many times as the
+ * This function should use #gp_abilities_list_append as many times as the
* number of models the camera driver supports. That is, fill out (in a loop)
* the #CameraAbilities for each model and append each of those to the
* supplied list using gp_abilities_list_append(). Then, return #GP_OK.
@@ -66,7 +66,7 @@ camera_abilities (CameraAbilitiesList *list)
* This is the most interesting function in your library. Here, you tell
* gphoto2 what operations your camera supports and you try to connect
* to the camera. That is, access camera->functions directly and set them
- * to your implementation (if you have any). Then, tell the #CameraFilesystem
+ * to your implementation (if you have any). Then, tell the #CameraFilesystem
* (available in #camera->fs) how to retrieve lists
* (gp_filesystem_set_list_funcs()), how to retrieve or set file information
* (gp_filesystem_set_info_funcs()), how to get or delete files
diff --git a/libgphoto2/gphoto2-list.c b/libgphoto2/gphoto2-list.c
index dc12ad4c2..d5faff858 100644
--- a/libgphoto2/gphoto2-list.c
+++ b/libgphoto2/gphoto2-list.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \note
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \note
* You should have received a copy of the GNU Lesser General Public
@@ -117,7 +117,7 @@ gp_list_unref (CameraList *list)
*
**/
int
-gp_list_free (CameraList *list)
+gp_list_free (CameraList *list)
{
int i;
C_PARAMS (list && list->ref_count);
@@ -220,7 +220,7 @@ gp_list_sort (CameraList *list)
/**
* Counts the entries in the \c list.
- *
+ *
* \param list a #CameraList
* \return a gphoto2 error code
*
diff --git a/libgphoto2/gphoto2-result.c b/libgphoto2/gphoto2-result.c
index f62a83c2f..0f37bcefd 100644
--- a/libgphoto2/gphoto2-result.c
+++ b/libgphoto2/gphoto2-result.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -63,7 +63,7 @@ static struct {
* \brief Translate a gphoto error code into a localized string
* \param result a gphoto2 error code
*
- * Translates a gphoto2 error code into a human readable string. If the
+ * Translates a gphoto2 error code into a human readable string. If the
* error occurred in combination with a camera,
* gp_camera_get_result_as_string() should be used instead.
*
@@ -80,7 +80,7 @@ gp_result_as_string (int result)
/* Camlib error? */
if (result <= -1000)
- return (N_("Unknown camera library error"));
+ return (N_("Unknown camera library error"));
for (i = 0; result_descriptions[i].description; i++)
if (result_descriptions[i].result == result)
diff --git a/libgphoto2/gphoto2-setting.c b/libgphoto2/gphoto2-setting.c
index 7410938eb..cfe2438be 100644
--- a/libgphoto2/gphoto2-setting.c
+++ b/libgphoto2/gphoto2-setting.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
diff --git a/libgphoto2/gphoto2-version.c b/libgphoto2/gphoto2-version.c
index 6cf16254c..a872e7c03 100644
--- a/libgphoto2/gphoto2-version.c
+++ b/libgphoto2/gphoto2-version.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
diff --git a/libgphoto2/gphoto2-widget.c b/libgphoto2/gphoto2-widget.c
index af0acccca..1a7f57e56 100644
--- a/libgphoto2/gphoto2-widget.c
+++ b/libgphoto2/gphoto2-widget.c
@@ -9,10 +9,10 @@
* version 2 of the License, or (at your option) any later version.
*
* \par
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Lesser General Public License for more details.
*
* \par
* You should have received a copy of the GNU Lesser General Public
@@ -53,8 +53,8 @@ struct _CameraWidget {
int choice_count;
/* For Range */
- float min;
- float max;
+ float min;
+ float max;
float increment;
/* Child info */
@@ -85,13 +85,13 @@ struct _CameraWidget {
*
* @param type the type
* @param label the label
- * @param widget
+ * @param widget
* @return a gphoto2 error code.
- *
+ *
**/
int
-gp_widget_new (CameraWidgetType type, const char *label,
- CameraWidget **widget)
+gp_widget_new (CameraWidgetType type, const char *label,
+ CameraWidget **widget)
{
static int i = 0;
@@ -101,7 +101,7 @@ gp_widget_new (CameraWidgetType type, const char *label,
(*widget)->type = type;
strcpy ((*widget)->label, label);
-
+
/* set the value to nothing */
(*widget)->value_int = 0;
(*widget)->value_float = 0.0;
@@ -126,7 +126,7 @@ gp_widget_new (CameraWidgetType type, const char *label,
*
* @param widget the #CameraWidget to be freed
* @return a gphoto2 error code.
- *
+ *
**/
int
gp_widget_free (CameraWidget *widget)
@@ -157,7 +157,7 @@ gp_widget_free (CameraWidget *widget)
*
**/
int
-gp_widget_ref (CameraWidget *widget)
+gp_widget_ref (CameraWidget *widget)
{
C_PARAMS (widget);
@@ -174,7 +174,7 @@ gp_widget_ref (CameraWidget *widget)
*
**/
int
-gp_widget_unref (CameraWidget *widget)
+gp_widget_unref (CameraWidget *widget)
{
C_PARAMS (widget);
@@ -261,7 +261,7 @@ gp_widget_set_name (CameraWidget *widget, const char *name)
* \brief Retrieves the unique id of the #CameraWidget
*
* @param widget a #CameraWidget
- * @param id
+ * @param id
* @return a gphoto2 error code.
*
**/
@@ -281,7 +281,7 @@ gp_widget_get_id (CameraWidget *widget, int *id)
* @param changed a boolean whether we changed or not
* @return a gphoto2 error code
*
- * Sets the changed of the CameraWidget depending on
+ * Sets the changed of the CameraWidget depending on
* the changed parameter.
*
**/
@@ -301,7 +301,7 @@ gp_widget_set_changed (CameraWidget *widget, int changed)
* @param changed a boolean whether we are readonly or not
* @return a gphoto2 error code
*
- * Sets the readonly of the CameraWidget depending on
+ * Sets the readonly of the CameraWidget depending on
* the changed parameter.
*
* Only useful when called from the camera driver.
@@ -324,7 +324,7 @@ gp_widget_set_readonly (CameraWidget *widget, int readonly)
*
**/
int
-gp_widget_get_readonly (CameraWidget *widget, int *readonly)
+gp_widget_get_readonly (CameraWidget *widget, int *readonly)
{
C_PARAMS (widget && readonly);
@@ -341,7 +341,7 @@ gp_widget_get_readonly (CameraWidget *widget, int *readonly)
*
**/
int
-gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type)
+gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type)
{
C_PARAMS (widget && type);
@@ -358,7 +358,7 @@ gp_widget_get_type (CameraWidget *widget, CameraWidgetType *type)
*
**/
int
-gp_widget_get_label (CameraWidget *widget, const char **label)
+gp_widget_get_label (CameraWidget *widget, const char **label)
{
C_PARAMS (widget && label);
@@ -370,7 +370,7 @@ gp_widget_get_label (CameraWidget *widget, const char **label)
* \brief Sets the value of the widget
*
* @param widget a #CameraWidget
- * @param value
+ * @param value
* @return a gphoto2 error code.
*
* Please pass
@@ -381,7 +381,7 @@ gp_widget_get_label (CameraWidget *widget, const char **label)
*
**/
int
-gp_widget_set_value (CameraWidget *widget, const void *value)
+gp_widget_set_value (CameraWidget *widget, const void *value)
{
C_PARAMS (widget && value);
@@ -431,7 +431,7 @@ gp_widget_set_value (CameraWidget *widget, const void *value)
*
**/
int
-gp_widget_get_value (CameraWidget *widget, void *value)
+gp_widget_get_value (CameraWidget *widget, void *value)
{
C_PARAMS (widget && value);
@@ -467,7 +467,7 @@ gp_widget_get_value (CameraWidget *widget, void *value)
*
**/
int
-gp_widget_append (CameraWidget *widget, CameraWidget *child)
+gp_widget_append (CameraWidget *widget, CameraWidget *child)
{
C_PARAMS (widget && child);
@@ -493,7 +493,7 @@ gp_widget_append (CameraWidget *widget, CameraWidget *child)
*
**/
int
-gp_widget_prepend (CameraWidget *widget, CameraWidget *child)
+gp_widget_prepend (CameraWidget *widget, CameraWidget *child)
{
int x;
@@ -526,7 +526,7 @@ gp_widget_prepend (CameraWidget *widget, CameraWidget *child)
*
**/
int
-gp_widget_count_children (CameraWidget *widget)
+gp_widget_count_children (CameraWidget *widget)
{
C_PARAMS (widget);
@@ -543,8 +543,8 @@ gp_widget_count_children (CameraWidget *widget)
*
**/
int
-gp_widget_get_child (CameraWidget *widget, int child_number,
- CameraWidget **child)
+gp_widget_get_child (CameraWidget *widget, int child_number,
+ CameraWidget **child)
{
C_PARAMS (widget && child);
C_PARAMS (child_number < widget->children_count);
@@ -563,7 +563,7 @@ gp_widget_get_child (CameraWidget *widget, int child_number,
*
**/
int
-gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
+gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
CameraWidget **child)
{
int x;
@@ -578,8 +578,8 @@ gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
for (x = 0; x < widget->children_count; x++) {
int result;
CameraWidget *child_rec;
-
- result = gp_widget_get_child_by_label (widget->children[x],
+
+ result = gp_widget_get_child_by_label (widget->children[x],
label, &child_rec);
if (result == GP_OK) {
*child = child_rec;
@@ -600,7 +600,7 @@ gp_widget_get_child_by_label (CameraWidget *widget, const char *label,
*
**/
int
-gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child)
+gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child)
{
int x;
@@ -610,12 +610,12 @@ gp_widget_get_child_by_id (CameraWidget *widget, int id, CameraWidget **child)
*child = widget;
return (GP_OK);
}
-
+
for (x = 0; x < widget->children_count; x++) {
int result;
CameraWidget *child_rec;
-
- result = gp_widget_get_child_by_id (widget->children[x], id,
+
+ result = gp_widget_get_child_by_id (widget->children[x], id,
&child_rec);
if (result == GP_OK) {
*child = child_rec;
@@ -646,11 +646,11 @@ gp_widget_get_child_by_name (CameraWidget *widget, const char *name,
*child = widget;
return (GP_OK);
}
-
+
for (x = 0; x < widget->children_count; x++) {
int result;
CameraWidget *child_rec;
-
+
result = gp_widget_get_child_by_name (widget->children[x], name,
&child_rec);
if (result == GP_OK) {
@@ -689,11 +689,11 @@ gp_widget_get_parent (CameraWidget *widget, CameraWidget **parent)
*
**/
int
-gp_widget_get_root (CameraWidget *widget, CameraWidget **root)
+gp_widget_get_root (CameraWidget *widget, CameraWidget **root)
{
C_PARAMS (widget && root);
- if (widget->parent)
+ if (widget->parent)
return (gp_widget_get_root (widget->parent, root));
else {
*root = widget;
@@ -735,8 +735,8 @@ gp_widget_set_range (CameraWidget *range, float min, float max, float increment)
*
**/
int
-gp_widget_get_range (CameraWidget *range, float *min, float *max,
- float *increment)
+gp_widget_get_range (CameraWidget *range, float *min, float *max,
+ float *increment)
{
C_PARAMS (range && min && max && increment);
C_PARAMS (range->type == GP_WIDGET_RANGE);
@@ -757,7 +757,7 @@ gp_widget_get_range (CameraWidget *range, float *min, float *max,
*
**/
int
-gp_widget_add_choice (CameraWidget *widget, const char *choice)
+gp_widget_add_choice (CameraWidget *widget, const char *choice)
{
C_PARAMS (widget && choice);
C_PARAMS ((widget->type == GP_WIDGET_RADIO) ||
@@ -774,10 +774,10 @@ gp_widget_add_choice (CameraWidget *widget, const char *choice)
*
* @param widget a #CameraWidget of type GP_WIDGET_RADIO or GP_WIDGET_MENU
* @return a gphoto2 error code or number of choices.
- *
+ *
**/
int
-gp_widget_count_choices (CameraWidget *widget)
+gp_widget_count_choices (CameraWidget *widget)
{
C_PARAMS (widget);
C_PARAMS ((widget->type == GP_WIDGET_RADIO) ||
@@ -796,8 +796,8 @@ gp_widget_count_choices (CameraWidget *widget)
*
**/
int
-gp_widget_get_choice (CameraWidget *widget, int choice_number,
- const char **choice)
+gp_widget_get_choice (CameraWidget *widget, int choice_number,
+ const char **choice)
{
C_PARAMS (widget && choice);
C_PARAMS ((widget->type == GP_WIDGET_RADIO) ||
@@ -820,7 +820,7 @@ gp_widget_get_choice (CameraWidget *widget, int choice_number,
*
**/
int
-gp_widget_changed (CameraWidget *widget)
+gp_widget_changed (CameraWidget *widget)
{
C_PARAMS (widget);
diff --git a/libgphoto2/jpeg.h b/libgphoto2/jpeg.h
index cedff4378..71355e190 100644
--- a/libgphoto2/jpeg.h
+++ b/libgphoto2/jpeg.h
@@ -1,5 +1,5 @@
/** \file
- *
+ *
* \author This code was written by Nathan Stenzel for gphoto
*
* \note