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/smal | |
parent | af2c0e0558e78cae06371abef36f43ca74a9c5c0 (diff) | |
download | libgphoto2-456a1d598bccc260b233d2e91c469be452e0fbef.tar.gz |
Remove trailing whitespace from all *.h and *.c files.
Diffstat (limited to 'camlibs/smal')
-rw-r--r-- | camlibs/smal/smal.c | 44 | ||||
-rw-r--r-- | camlibs/smal/smal.h | 6 | ||||
-rw-r--r-- | camlibs/smal/ultrapocket.c | 20 | ||||
-rw-r--r-- | camlibs/smal/ultrapocket.h | 6 |
4 files changed, 38 insertions, 38 deletions
diff --git a/camlibs/smal/smal.c b/camlibs/smal/smal.c index 41a575fd7..b8bbe89da 100644 --- a/camlibs/smal/smal.c +++ b/camlibs/smal/smal.c @@ -7,10 +7,10 @@ * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the @@ -45,7 +45,7 @@ #endif int -camera_id (CameraText *id) +camera_id (CameraText *id) { strcpy(id->text, "smal"); return (GP_OK); @@ -67,11 +67,11 @@ static const struct smal_cameras { }; int -camera_abilities (CameraAbilitiesList *list) +camera_abilities (CameraAbilitiesList *list) { CameraAbilities a; int i; - + memset(&a, 0, sizeof(a)); a.status = GP_DRIVER_STATUS_EXPERIMENTAL; /* highly! */ a.port = GP_PORT_USB; @@ -89,7 +89,7 @@ camera_abilities (CameraAbilitiesList *list) } static int -camera_exit (Camera *camera, GPContext *context) +camera_exit (Camera *camera, GPContext *context) { if (camera->pl) { free(camera->pl); @@ -106,7 +106,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, Camera *camera = user_data; int size,image_no,result; unsigned char *data; - + image_no = gp_filesystem_number(fs, folder, filename, context); if (image_no < GP_OK) return image_no; @@ -117,7 +117,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, gp_file_set_mime_type (file, GP_MIME_PPM); break; case GP_FILE_TYPE_RAW: - result = ultrapocket_getrawpicture(camera, context, + result = ultrapocket_getrawpicture(camera, context, &data, &size, filename); gp_file_set_mime_type (file, GP_MIME_PPM); break; @@ -127,9 +127,9 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, } if (result < 0) return result; - + CHECK_RESULT(gp_file_set_data_and_size (file, (char *)data, size)); - + return (GP_OK); } @@ -139,13 +139,13 @@ delete_file_func (CameraFilesystem *fs, const char *folder, { Camera *camera = data; int image_no; - + image_no = gp_filesystem_number(fs, folder, filename, context); if (image_no < GP_OK) return image_no; CHECK_RESULT(ultrapocket_deletefile(camera, filename)); - + return (GP_OK); } @@ -165,7 +165,7 @@ camera_about (Camera *camera, CameraText *about, GPContext *context) strcpy (about->text, _("Smal Ultrapocket\n" "Lee Benfield <lee@benf.org>\n" "Driver for accessing the Smal Ultrapocket camera, and OEM versions (slimshot)")); - + return (GP_OK); } @@ -175,11 +175,11 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list, { Camera *camera = data; int count, result; - + result = ultrapocket_getpicsoverview(camera, context, &count, list); if (result != GP_OK) return result; - + return (GP_OK); } @@ -191,11 +191,11 @@ static CameraFilesystemFuncs fsfuncs = { }; int -camera_init (Camera *camera, GPContext *context) +camera_init (Camera *camera, GPContext *context) { CameraAbilities cab; up_badge_type badge; - + camera->functions->exit = camera_exit; camera->functions->about = camera_about; gp_filesystem_set_funcs (camera->fs, &fsfuncs, camera); @@ -206,8 +206,8 @@ camera_init (Camera *camera, GPContext *context) case USB_VENDOR_ID_CREATIVE: switch (cab.usb_product) { case USB_DEVICE_ID_ULTRAPOCKET: - /* could be an axia eyeplate or a slimshot - * figure it out later, when we get the image + /* could be an axia eyeplate or a slimshot + * figure it out later, when we get the image * catalogue. */ badge = BADGE_GENERIC; @@ -234,12 +234,12 @@ camera_init (Camera *camera, GPContext *context) default: break; } - + if (badge == BADGE_UNKNOWN) { /* can't happen. Otherwise, how'd we get to camera_init, neh? */ return GP_ERROR; } - + camera->pl = malloc (sizeof (CameraPrivateLibrary)); camera->pl->up_type = badge; /* don't need to do any exciting init stuff until we get pic numbers */ diff --git a/camlibs/smal/smal.h b/camlibs/smal/smal.h index 622b66d5e..46677dd88 100644 --- a/camlibs/smal/smal.h +++ b/camlibs/smal/smal.h @@ -7,10 +7,10 @@ * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the diff --git a/camlibs/smal/ultrapocket.c b/camlibs/smal/ultrapocket.c index 2e0859db0..7f0addfaa 100644 --- a/camlibs/smal/ultrapocket.c +++ b/camlibs/smal/ultrapocket.c @@ -36,7 +36,7 @@ #include "smal.h" #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -# define sleep(x) +# define sleep(x) #endif #define GP_MODULE "Smal Ultrapocket" @@ -210,7 +210,7 @@ getpicture_logitech_pd(Camera *camera, GPContext *context, unsigned char **rd, c * use a different protocol - have to differetiate. */ int -ultrapocket_getrawpicture(Camera *camera, GPContext *context, +ultrapocket_getrawpicture(Camera *camera, GPContext *context, unsigned char **pdata, int *size, const char *filename) { char ppmheader[200]; @@ -265,13 +265,13 @@ ultrapocket_getrawpicture(Camera *camera, GPContext *context, /* and chop the spare 4 pixels off the RHS */ for (pc = 1; pc < height; pc++) { - memmove(outdata + pmmhdr_len + ((long)width * pc * 3), - outdata + pmmhdr_len + (((long)width + 4) * pc * 3), + memmove(outdata + pmmhdr_len + ((long)width * pc * 3), + outdata + pmmhdr_len + (((long)width + 4) * pc * 3), ((long)width) * 3); } /* modify outsize to reflect trim */ outsize = ((long)width) * height * 3 + pmmhdr_len; - + free(rawdata); if (result < 0) { free (outdata); @@ -329,7 +329,7 @@ ultrapocket_getpicture(Camera *camera, GPContext *context, unsigned char **pdata ", gamma %.2f" #endif "\n%d %d\n" - "255\n", BayerTileNames[tile], + "255\n", BayerTileNames[tile], #if DO_GAMMA GAMMA_NUMBER, #endif @@ -354,8 +354,8 @@ ultrapocket_getpicture(Camera *camera, GPContext *context, unsigned char **pdata /* and chop the spare 4 pixels off the RHS */ for (pc = 1; pc < height; pc++) { - memmove(outdata + pmmhdr_len + ((long)width * pc * 3), - outdata + pmmhdr_len + (((long)width + 4) * pc * 3), + memmove(outdata + pmmhdr_len + ((long)width * pc * 3), + outdata + pmmhdr_len + (((long)width + 4) * pc * 3), ((long)width) * 3); } /* modify outsize to reflect trim */ @@ -505,7 +505,7 @@ static int getpicsoverview_generic( char fn[20]; int picid; int reset_needed; - + CHECK_RESULT(ultrapocket_sync(camera)); memset(command, 0, 16); @@ -579,7 +579,7 @@ static int getpicsoverview_logitech_pd( * * Fuji Slimshot + Axia etc * The camera responds with 8 * 0x1000 bytes - * + * * Creative CardCam * The camera responds with 8 * 0x1000 bytes * diff --git a/camlibs/smal/ultrapocket.h b/camlibs/smal/ultrapocket.h index b951daafd..5d193c7fe 100644 --- a/camlibs/smal/ultrapocket.h +++ b/camlibs/smal/ultrapocket.h @@ -7,10 +7,10 @@ * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the |