Uemis downloader: small whitespace change

This makes the comments line up more nicely and fixes some other random
issues in preparation for the following changes.

[Dirk Hohndel: refactored one huge commit into smaller pieces]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Guido Lerch 2015-09-05 10:29:43 -07:00 committed by Dirk Hohndel
parent 6917d021fb
commit 3a074b61d1

View file

@ -9,6 +9,8 @@
* I believe that I only used the information about HOW to do this (download data from the Uemis * I believe that I only used the information about HOW to do this (download data from the Uemis
* Zurich) but did not actually use any of his copyrighted code, therefore the license under which * Zurich) but did not actually use any of his copyrighted code, therefore the license under which
* he released his code does not apply to this new implementation in C * he released his code does not apply to this new implementation in C
*
* Modified by Guido Lerch guido.lerch@gmx.ch in August 2015
*/ */
#include <fcntl.h> #include <fcntl.h>
#include <dirent.h> #include <dirent.h>
@ -28,6 +30,7 @@
#define BUFLEN 2048 #define BUFLEN 2048
#define NUM_PARAM_BUFS 10 #define NUM_PARAM_BUFS 10
#if UEMIS_DEBUG & 64 /* we are reading from a copy of the filesystem, not the device - no need to wait */ #if UEMIS_DEBUG & 64 /* we are reading from a copy of the filesystem, not the device - no need to wait */
#define UEMIS_TIMEOUT 50 /* 50ns */ #define UEMIS_TIMEOUT 50 /* 50ns */
#define UEMIS_LONG_TIMEOUT 500 /* 500ns */ #define UEMIS_LONG_TIMEOUT 500 /* 500ns */
@ -615,7 +618,7 @@ static bool uemis_get_answer(const char *path, char *request, int n_param_in,
#endif #endif
return found_answer; return found_answer;
fs_error: fs_error:
close (ans_file); close(ans_file);
return false; return false;
} }
@ -666,9 +669,9 @@ static void track_divespot(char *val, int diveid, uint32_t dive_site_uuid)
return; return;
} }
static char *suit[] = { "", QT_TRANSLATE_NOOP("gettextFromC", "wetsuit"), QT_TRANSLATE_NOOP("gettextFromC", "semidry"), QT_TRANSLATE_NOOP("gettextFromC", "drysuit") }; static char *suit[] = {"", QT_TRANSLATE_NOOP("gettextFromC", "wetsuit"), QT_TRANSLATE_NOOP("gettextFromC", "semidry"), QT_TRANSLATE_NOOP("gettextFromC", "drysuit")};
static char *suit_type[] = { "", QT_TRANSLATE_NOOP("gettextFromC", "shorty"), QT_TRANSLATE_NOOP("gettextFromC", "vest"), QT_TRANSLATE_NOOP("gettextFromC", "long john"), QT_TRANSLATE_NOOP("gettextFromC", "jacket"), QT_TRANSLATE_NOOP("gettextFromC", "full suit"), QT_TRANSLATE_NOOP("gettextFromC", "2 pcs full suit") }; static char *suit_type[] = {"", QT_TRANSLATE_NOOP("gettextFromC", "shorty"), QT_TRANSLATE_NOOP("gettextFromC", "vest"), QT_TRANSLATE_NOOP("gettextFromC", "long john"), QT_TRANSLATE_NOOP("gettextFromC", "jacket"), QT_TRANSLATE_NOOP("gettextFromC", "full suit"), QT_TRANSLATE_NOOP("gettextFromC", "2 pcs full suit")};
static char *suit_thickness[] = { "", "0.5-2mm", "2-3mm", "3-5mm", "5-7mm", "8mm+", QT_TRANSLATE_NOOP("gettextFromC", "membrane") }; static char *suit_thickness[] = {"", "0.5-2mm", "2-3mm", "3-5mm", "5-7mm", "8mm+", QT_TRANSLATE_NOOP("gettextFromC", "membrane")};
static void parse_tag(struct dive *dive, char *tag, char *val) static void parse_tag(struct dive *dive, char *tag, char *val)
{ {