mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Massive automated whitespace cleanup
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
006265d7a0
commit
76e6420f6b
114 changed files with 4370 additions and 3717 deletions
24
macos.c
24
macos.c
|
@ -17,9 +17,9 @@
|
|||
* but no similar macros if a C string variable is supposed to be
|
||||
* the argument. We add this here (hardcoding the default allocator
|
||||
* and MacRoman encoding */
|
||||
#define CFSTR_VAR(_var) CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, \
|
||||
(_var), kCFStringEncodingMacRoman, \
|
||||
kCFAllocatorNull)
|
||||
#define CFSTR_VAR(_var) CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, \
|
||||
(_var), kCFStringEncodingMacRoman, \
|
||||
kCFAllocatorNull)
|
||||
|
||||
#define SUBSURFACE_PREFERENCES CFSTR("org.hohndel.subsurface")
|
||||
#define ICON_NAME "Subsurface.icns"
|
||||
|
@ -41,7 +41,7 @@ const char *system_default_filename(void)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
int enumerate_devices (device_callback_t callback, void *userdata)
|
||||
int enumerate_devices(device_callback_t callback, void *userdata)
|
||||
{
|
||||
int index = -1;
|
||||
DIR *dp = NULL;
|
||||
|
@ -54,21 +54,21 @@ int enumerate_devices (device_callback_t callback, void *userdata)
|
|||
NULL
|
||||
};
|
||||
|
||||
dp = opendir (dirname);
|
||||
dp = opendir(dirname);
|
||||
if (dp == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((ep = readdir (dp)) != NULL) {
|
||||
while ((ep = readdir(dp)) != NULL) {
|
||||
for (i = 0; patterns[i] != NULL; ++i) {
|
||||
if (fnmatch (patterns[i], ep->d_name, 0) == 0) {
|
||||
if (fnmatch(patterns[i], ep->d_name, 0) == 0) {
|
||||
char filename[1024];
|
||||
int n = snprintf (filename, sizeof (filename), "%s/%s", dirname, ep->d_name);
|
||||
if (n >= sizeof (filename)) {
|
||||
closedir (dp);
|
||||
int n = snprintf(filename, sizeof(filename), "%s/%s", dirname, ep->d_name);
|
||||
if (n >= sizeof(filename)) {
|
||||
closedir(dp);
|
||||
return -1;
|
||||
}
|
||||
callback (filename, userdata);
|
||||
callback(filename, userdata);
|
||||
if (is_default_dive_computer_device(filename))
|
||||
index = i;
|
||||
break;
|
||||
|
@ -77,7 +77,7 @@ int enumerate_devices (device_callback_t callback, void *userdata)
|
|||
}
|
||||
// TODO: list UEMIS mount point from /proc/mounts
|
||||
|
||||
closedir (dp);
|
||||
closedir(dp);
|
||||
return index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue