diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-07-07 13:53:30 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-07-07 13:53:30 +0200 |
commit | a4cadf78faabc157e5db00e42302d495bba432c0 (patch) | |
tree | 6ff212e24fe750b04b37ca66c418fe366c5e5fd4 /src/common.h | |
parent | 28fde3cd0129202d586cb4c24877a3e3f55ca582 (diff) | |
download | profani-tty-a4cadf78faabc157e5db00e42302d495bba432c0.tar.gz |
Revert "Apply coding style"
This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/common.h b/src/common.h index 588abd10..93e4a609 100644 --- a/src/common.h +++ b/src/common.h @@ -45,23 +45,24 @@ #define notify_notification_new(summary, body, icon) notify_notification_new(summary, body, icon, NULL) #endif -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) // assume malloc stores at most 8 bytes for size of allocated memory // and page size is at least 4KB #define READ_BUF_SIZE 4088 + #define FREE_SET_NULL(resource) \ - do { \ - free(resource); \ - resource = NULL; \ - } while (0) +do { \ + free(resource); \ + resource = NULL; \ +} while (0) #define GFREE_SET_NULL(resource) \ - do { \ - g_free(resource); \ - resource = NULL; \ - } while (0) +do { \ + g_free(resource); \ + resource = NULL; \ +} while (0) typedef enum { CONTACT_OFFLINE, @@ -80,31 +81,31 @@ typedef enum { RESOURCE_XA } resource_presence_t; -gboolean create_dir(char* name); -gboolean mkdir_recursive(const char* dir); -gboolean copy_file(const char* const src, const char* const target, const gboolean overwrite_existing); -char* str_replace(const char* string, const char* substr, const char* replacement); +gboolean create_dir(char *name); +gboolean mkdir_recursive(const char *dir); +gboolean copy_file(const char *const src, const char *const target, const gboolean overwrite_existing); +char* str_replace(const char *string, const char *substr, const char *replacement); int str_contains(const char str[], int size, char ch); -gboolean strtoi_range(char* str, int* saveptr, int min, int max, char** err_msg); -int utf8_display_len(const char* const str); +gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg); +int utf8_display_len(const char *const str); char* release_get_latest(void); -gboolean release_is_new(char* found_version); +gboolean release_is_new(char *found_version); -char* get_file_or_linked(char* loc, char* basedir); -char* strip_arg_quotes(const char* const input); +char* get_file_or_linked(char *loc, char *basedir); +char* strip_arg_quotes(const char *const input); gboolean is_notify_enabled(void); -GSList* prof_occurrences(const char* const needle, const char* const haystack, int offset, gboolean whole_word, - GSList** result); -GSList* get_mentions(gboolean whole_word, gboolean case_sensitive, const char* const message, const char* const nick); +GSList* prof_occurrences(const char *const needle, const char *const haystack, int offset, gboolean whole_word, + GSList **result); +GSList* get_mentions(gboolean whole_word, gboolean case_sensitive, const char *const message, const char *const nick); -int is_regular_file(const char* path); -int is_dir(const char* path); -void get_file_paths_recursive(const char* directory, GSList** contents); +int is_regular_file(const char *path); +int is_dir(const char *path); +void get_file_paths_recursive(const char *directory, GSList **contents); char* get_random_string(int length); -gboolean call_external(gchar** argv, gchar*** const output_ptr, gchar*** const error_ptr); +gboolean call_external(gchar **argv, gchar ***const output_ptr, gchar ***const error_ptr); #endif |