mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +00:00
Run clang-format.
This commit is contained in:
parent
2f8bfbd807
commit
68868f4cc0
@ -772,7 +772,7 @@ void print_github(struct text_object *obj, char *p, unsigned int p_max_size) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, github_url);
|
||||
#if defined(CURLOPT_ACCEPT_ENCODING)
|
||||
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");
|
||||
#else /* defined(CURLOPT_ACCEPT_ENCODING) */
|
||||
#else /* defined(CURLOPT_ACCEPT_ENCODING) */
|
||||
curl_easy_setopt(curl, CURLOPT_ENCODING, "gzip");
|
||||
#endif /* defined(CURLOPT_ACCEPT_ENCODING) */
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, user_agent);
|
||||
|
@ -167,7 +167,7 @@ void get_fs_type(const char *path, char *result) {
|
||||
return;
|
||||
#elif defined(__sun)
|
||||
assert(0); /* not used - see update_fs_stat() */
|
||||
#else /* HAVE_STRUCT_STATFS_F_FSTYPENAME */
|
||||
#else /* HAVE_STRUCT_STATFS_F_FSTYPENAME */
|
||||
|
||||
struct mntent *me;
|
||||
FILE *mtab = setmntent("/proc/mounts", "r");
|
||||
|
@ -115,7 +115,7 @@ static int do_connect_fail(mpd_Connection *connection,
|
||||
return (connect(connection->sock, serv_addr, addrlen) == SOCKET_ERROR &&
|
||||
WSAGetLastError() != WSAEWOULDBLOCK);
|
||||
}
|
||||
#else /* !WIN32 (sane operating systems) */
|
||||
#else /* !WIN32 (sane operating systems) */
|
||||
static int do_connect_fail(mpd_Connection *connection,
|
||||
const struct sockaddr *serv_addr, int addrlen) {
|
||||
int flags = fcntl(connection->sock, F_GETFL, 0);
|
||||
@ -247,7 +247,7 @@ static int mpd_connect(mpd_Connection *connection, const char *host, int port,
|
||||
connection->error = MPD_ERROR_UNKHOST;
|
||||
return -1;
|
||||
}
|
||||
#else /* HAVE_GETHOSTBYNAME_R */
|
||||
#else /* HAVE_GETHOSTBYNAME_R */
|
||||
if (!(he_res = gethostbyname(host))) {
|
||||
snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH,
|
||||
"host \"%s\" not found", host);
|
||||
|
@ -3079,5 +3079,5 @@ void get_top_info(void) {
|
||||
calc_cpu_each(total); /* and then the percentage for each task */
|
||||
#ifdef BUILD_IOSTATS
|
||||
calc_io_each(); /* percentage of I/O for each task */
|
||||
#endif /* BUILD_IOSTATS */
|
||||
#endif /* BUILD_IOSTATS */
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg,
|
||||
#ifdef BUILD_IPV6
|
||||
bool shownetmask = false;
|
||||
bool showscope = false;
|
||||
#endif /* BUILD_IPV6 */
|
||||
#endif /* BUILD_IPV6 */
|
||||
char nextarg[21]; // longest arg possible is a devname (max 20 chars)
|
||||
int i = 0;
|
||||
struct net_stat *netstat = nullptr;
|
||||
@ -169,7 +169,7 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg,
|
||||
netstat = get_net_stat(nextarg, obj, free_at_crash);
|
||||
#ifdef BUILD_IPV6
|
||||
}
|
||||
#endif /* BUILD_IPV6 */
|
||||
#endif /* BUILD_IPV6 */
|
||||
i += strlen(nextarg); // skip this arg
|
||||
while (
|
||||
!((isspace(static_cast<unsigned char>(arg[i])) != 0) || arg[i] == 0)) {
|
||||
|
@ -52,7 +52,7 @@ inline int scroll_character_length(char c) {
|
||||
|
||||
return len;
|
||||
}
|
||||
#else /* BUILD_X11 */
|
||||
#else /* BUILD_X11 */
|
||||
(void)c;
|
||||
#endif /* BUILD_X11 */
|
||||
|
||||
|
@ -419,7 +419,7 @@ void new_gauge(struct text_object *obj, char *p, unsigned int p_max_size,
|
||||
if (out_to_stdout.get(*state)) {
|
||||
new_gauge_in_shell(obj, p, p_max_size, usage);
|
||||
}
|
||||
#else /* BUILD_X11 */
|
||||
#else /* BUILD_X11 */
|
||||
new_gauge_in_shell(obj, p, p_max_size, usage);
|
||||
#endif /* BUILD_X11 */
|
||||
}
|
||||
@ -729,7 +729,7 @@ void new_bar(struct text_object *obj, char *p, unsigned int p_max_size,
|
||||
if (out_to_stdout.get(*state)) {
|
||||
new_bar_in_shell(obj, p, p_max_size, usage);
|
||||
}
|
||||
#else /* BUILD_X11 */
|
||||
#else /* BUILD_X11 */
|
||||
new_bar_in_shell(obj, p, p_max_size, usage);
|
||||
#endif /* BUILD_X11 */
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj) {
|
||||
} else {
|
||||
#ifdef BUILD_IOSTATS
|
||||
NORM_ERR("Must be top, top_mem, top_time or top_io");
|
||||
#else /* BUILD_IOSTATS */
|
||||
#else /* BUILD_IOSTATS */
|
||||
NORM_ERR("Must be top, top_mem or top_time");
|
||||
#endif /* BUILD_IOSTATS */
|
||||
free_and_zero(obj->data.opaque);
|
||||
@ -629,7 +629,7 @@ int parse_top_args(const char *s, const char *arg, struct text_object *obj) {
|
||||
NORM_ERR(
|
||||
"must be one of: name, cpu, pid, mem, time, mem_res, mem_vsize, "
|
||||
"io_read, io_write, io_perc");
|
||||
#else /* BUILD_IOSTATS */
|
||||
#else /* BUILD_IOSTATS */
|
||||
NORM_ERR("must be one of: name, cpu, pid, mem, time, mem_res, mem_vsize");
|
||||
#endif /* BUILD_IOSTATS */
|
||||
free_and_zero(td->s);
|
||||
|
@ -5649,7 +5649,7 @@ bool isDebuggerActive();
|
||||
// raise() called from it, i.e. one stack frame below.
|
||||
#if defined(__GNUC__) && (defined(__i386) || defined(__x86_64))
|
||||
#define CATCH_TRAP() asm volatile("int $3") /* NOLINT */
|
||||
#else // Fall back to the generic way.
|
||||
#else // Fall back to the generic way.
|
||||
#include <signal.h>
|
||||
|
||||
#define CATCH_TRAP() raise(SIGTRAP)
|
||||
|
Loading…
Reference in New Issue
Block a user