forked from gphoto/libgphoto2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix white-space and indentation inconsistencies (second round)
This is basically a continuation of the work from gphoto#1002 but her for the camlibs directory. The purpose was to replace spaces as a means for indentation with tab characters. Note: there are some files which are still offending the general rule but are (mostly) consistent within themselves. I let them be for the moment. Fixing them would basically replace the whole file. Also: there are still a ton of whitespace related inconsistencies like "x=10" vs "x = 10" or "func(10)" vs "func (10)". This is a whitespace only change (if you include newlines as whitespace).
- Loading branch information
Showing
123 changed files
with
5,302 additions
and
5,407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,15 +74,15 @@ adc65_ping(Camera *camera) { | |
|
||
static int | ||
adc65_file_count (Camera *camera) { | ||
unsigned char cmd, resp[65538]; | ||
unsigned char cmd, resp[65538]; | ||
int ret; | ||
|
||
GP_DEBUG("Getting the number of pictures."); | ||
cmd = 0x00; | ||
ret = adc65_exchange(camera, &cmd, 1, resp, 65538); | ||
GP_DEBUG("Getting the number of pictures."); | ||
cmd = 0x00; | ||
ret = adc65_exchange(camera, &cmd, 1, resp, 65538); | ||
if (ret < 2) /* must have at least a 2 byte reply */ | ||
return ret; | ||
return resp[1] - 1; | ||
return ret; | ||
return resp[1] - 1; | ||
} | ||
|
||
static char * | ||
|
@@ -102,7 +102,7 @@ adc65_read_data (Camera *camera, unsigned char *cmd, int cmd_size, int data_type | |
/* get the picture */ | ||
ret = adc65_exchange (camera, cmd, cmd_size, resp, 2); | ||
if (ret < 2) | ||
return NULL; | ||
return NULL; | ||
|
||
us = malloc (65536); | ||
if (!us) | ||
|
@@ -224,23 +224,23 @@ get_file_func ( CameraFilesystem *fs, const char *folder, | |
CameraFile *file, void *user_data, GPContext *context) | ||
{ | ||
Camera *camera = user_data; | ||
int size, num; | ||
char *data; | ||
int size, num; | ||
char* data; | ||
|
||
gp_file_set_mime_type (file, GP_MIME_PPM); | ||
num = gp_filesystem_number (fs, folder, filename, context); | ||
gp_file_set_mime_type (file, GP_MIME_PPM); | ||
num = gp_filesystem_number (fs, folder, filename, context); | ||
if (num < 0) | ||
return num; | ||
data = adc65_read_picture (camera, num, &size); | ||
if (!data) | ||
data = adc65_read_picture (camera, num, &size); | ||
if (!data) | ||
return GP_ERROR; | ||
return gp_file_append (file,data,size); | ||
return gp_file_append (file, data, size); | ||
} | ||
|
||
static int | ||
camera_about (Camera *camera, CameraText *about, GPContext *context) { | ||
strcpy (about->text, _("Adc65\nBenjamin Moos <[email protected]>")); | ||
return GP_OK; | ||
strcpy (about->text, _("Adc65\nBenjamin Moos <[email protected]>")); | ||
return GP_OK; | ||
} | ||
|
||
static CameraFilesystemFuncs fsfuncs = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.