From 032894a489ecd6eb0eabe85164597be41310048a Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Sat, 20 Jun 2020 09:48:52 +0000 Subject: [PATCH] Get rid of trailing whitespaces (8 / 14) Remove trailing whitespaces Differential Revision: https://phab.enlightenment.org/D12007 --- src/lib/eina/eina_cpu.h | 4 ++-- src/lib/eina/eina_debug_bt.c | 4 ++-- src/lib/eina/eina_file.c | 4 ++-- src/lib/eina/eina_file.h | 8 ++++---- src/lib/eina/eina_file_common.h | 2 +- src/lib/eina/eina_fp.h | 6 +++--- src/lib/eina/eina_freeq.c | 8 ++++---- src/lib/eina/eina_freeq.h | 34 +++++++++++++++---------------- src/lib/eina/eina_log.h | 14 ++++++------- src/lib/eina/eina_matrixsparse.c | 2 +- src/lib/eina/eina_mmap.c | 2 +- src/lib/eina/eina_promise.h | 2 +- src/lib/eina/eina_rbtree.c | 2 +- src/lib/eina/eina_strbuf_common.c | 8 ++++---- src/lib/eina/eina_thread.c | 2 +- src/lib/eina/eina_tiler.c | 4 ++-- src/lib/eina/eina_value.c | 8 ++++---- src/lib/eina/eina_value.h | 2 +- 18 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/lib/eina/eina_cpu.h b/src/lib/eina/eina_cpu.h index b3b3c04747..c5724ab2c5 100644 --- a/src/lib/eina/eina_cpu.h +++ b/src/lib/eina/eina_cpu.h @@ -94,7 +94,7 @@ EAPI int eina_cpu_page_size(void); * @brief Reverses the byte order of a 16-bit (destination) register. * * @param[in] x The binary word to swap - * @return A byte order swapped 16-bit integer. + * @return A byte order swapped 16-bit integer. * * On big endian systems, the number is converted to little endian byte order. * On little endian systems, the number is converted to big endian byte order. @@ -105,7 +105,7 @@ static inline unsigned short eina_swap16(unsigned short x); * @brief Reverses the byte order of a 32-bit (destination) register. * * @param[in] x The binary word to swap - * @return A byte order swapped 32-bit integer. + * @return A byte order swapped 32-bit integer. * * On big endian systems, the number is converted to little endian byte order. * On little endian systems, the number is converted to big endian byte order. diff --git a/src/lib/eina/eina_debug_bt.c b/src/lib/eina/eina_debug_bt.c index b915f23230..69e5c608fd 100644 --- a/src/lib/eina/eina_debug_bt.c +++ b/src/lib/eina/eina_debug_bt.c @@ -50,7 +50,7 @@ // broken on OSX in that a HUP signal will maybe cause a crash... but compiling // with -pg would have guaranteed always caused a crash before anyway. // given OSX only supports "old-style" signals like: -// +// // #define SIGHUP 1 /* hangup */ // #define SIGINT 2 /* interrupt */ // #define SIGQUIT 3 /* quit */ @@ -91,7 +91,7 @@ // #endif // #define SIGUSR1 30 /* user defined signal 1 */ // #define SIGUSR2 31 /* user defined signal 2 */ -// +// // (excerpt from OSX's signal.h - found at: // http://github.com/st3fan/osx-10.9/blob/master/xnu-2422.1.72/bsd/sys/signal.h // pasting here due to how difficult it was to find a signal list for OSX) diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c index 0d9486568f..c8abe6d39a 100644 --- a/src/lib/eina/eina_file.c +++ b/src/lib/eina/eina_file.c @@ -366,7 +366,7 @@ _eina_file_map_rule_apply(Eina_File_Populate rule, const void *map, unsigned lon case EINA_FILE_REMOVE: flag = MADV_FREE; break; #else # warning "EINA_FILE_REMOVE does not have system support" -#endif +#endif default: return tmp; break; } @@ -511,7 +511,7 @@ eina_file_mmap_faulty(void *addr, long page_size) /* ================================================================ * * Simplified logic for portability layer with eina_file_common * - * ================================================================ */ + * ================================================================ */ Eina_Bool eina_file_path_relative(const char *path) diff --git a/src/lib/eina/eina_file.h b/src/lib/eina/eina_file.h index 404dea1ccb..7650884367 100644 --- a/src/lib/eina/eina_file.h +++ b/src/lib/eina/eina_file.h @@ -356,10 +356,10 @@ EAPI int eina_file_statat(void *container, Eina_File_Direct_Info *info, Eina_Sta * if no fd's are to be skipped, but if some fd's are to skip being * closed then this will be an array of fd numbers being terminated * by a fd value of -1. - * + * * @param[in] fd The fd value to begin closing at * @param[in] except_fd An array of fd's not to close terminated by -1 as the last invalid fd - * + * * @since 1.24 */ EAPI void eina_file_close_from(int fd, int *except_fd); @@ -674,13 +674,13 @@ EAPI void eina_file_map_free(Eina_File *file, void *map); * @details This advises the operating system as to what to do with the memory mapped * to the given @p file. This affects a specific range of memory and may not * be honored if the system chooses to ignore the request. - * + * * @param[in] file The file handle from which the map comes * @param[in] rule The rule to apply to the mapped memory * @param[in] map Memory that was mapped inside of which the memory range is * @param[in] offset The offset in bytes from the start of the map address * @param[in] length The length in bytes of the memory region to populate - * + * * @since 1.8 */ EAPI void diff --git a/src/lib/eina/eina_file_common.h b/src/lib/eina/eina_file_common.h index 38c1a3c4ee..9aedfae755 100644 --- a/src/lib/eina/eina_file_common.h +++ b/src/lib/eina/eina_file_common.h @@ -69,7 +69,7 @@ typedef struct _Eina_Lines_Iterator Eina_Lines_Iterator; struct _Eina_File { EINA_MAGIC; /**< Indicates whether Eina Magic should be used. */ - const char *filename; /**< The absolute path of the file. Note that the path given when calling @ref eina_file_open will be run through @ref eina_file_path_sanitize before it is stored here. */ + const char *filename; /**< The absolute path of the file. Note that the path given when calling @ref eina_file_open will be run through @ref eina_file_path_sanitize before it is stored here. */ Eina_Hash *map; /**< Tracks portions of a file that have been mapped with mmap(2). The key is a tuple offset/length and the data is a pointer to the mapped region. */ Eina_Hash *rmap; /**< Similar function to #map, but used to look up mapped areas by pointer rather than offset/length. */ void *global_map; /**< A pointer to the entire contents of the file that have been mapped with mmap(2). This is the common case, and EFL and is optimized for it. */ diff --git a/src/lib/eina/eina_fp.h b/src/lib/eina/eina_fp.h index 49d6662cdb..ceb41dd9d6 100644 --- a/src/lib/eina/eina_fp.h +++ b/src/lib/eina/eina_fp.h @@ -144,7 +144,7 @@ static inline Eina_F32p32 eina_f32p32_mul(Eina_F32p32 a, Eina_F32p32 b); /** * @brief Calculates the scale multiplication of one Eina_F32p32 floating point - * number with an integer + * number with an integer * * @param[in] a The Eina_F32p32 number * @param[in] b The integer value @@ -230,7 +230,7 @@ static inline Eina_F16p16 eina_f16p16_int_from(int32_t v); /** * @brief Creates a new standard 32-bit integer from Eina_F16p16 floating point - * number + * number * * @param[in] v Eina_F16p16 value to convert * @return The value converted into 32-bit integer @@ -247,7 +247,7 @@ static inline Eina_F16p16 eina_f16p16_double_from(double v); /** * @brief Creates a new standard double from Eina_F16p16 floating point - * number + * number * * @param[in] v Eina_F16p16 value to convert * @return The value converted into double diff --git a/src/lib/eina/eina_freeq.c b/src/lib/eina/eina_freeq.c index 0cc7cd5fad..bc55b80c91 100644 --- a/src/lib/eina/eina_freeq.c +++ b/src/lib/eina/eina_freeq.c @@ -200,21 +200,21 @@ typedef struct _Eina_FreeQ_Block Eina_FreeQ_Block; // F: 0xaaab04a55170 0xffff8af1c638 0xc0 // F: 0xaaab04a55ca0 0xffff8af1c638 0xc0 // ... -// so in future maybe create delta compression. keep a "start value" in the +// so in future maybe create delta compression. keep a "start value" in the // Eina_FreeQ_Block block for each to begin from (and update these as we // march blcok->start forward (or at least update them when we finish a run // of processing items at the end of the processing. -// +// // we can store things as DELTAS from the preview value. ptr, func, size all // are ptr sized values so we can compress them with deltas and thus encode // them in variable runs of bytes depending on the size of the delta. e.g. // use LEB128 maybe or PrefixVariant. -// +// // after some playng leb128 seems to be the best from simplicity (so fast // encode which matters and decode needs to be good too) and size. i saw // a reduction to 24% of the original data size this way based on the sample // data i collected like above. is it worth the extra cycles? don't know. -// +// // when looking at the deltas i noticed that func and sie delats are very // often 0 for long runs. this means we can probably use RLE effectively // if we split this into 3 streams wahc delta compressed then RLE compressed diff --git a/src/lib/eina/eina_freeq.h b/src/lib/eina/eina_freeq.h index acbc59b765..b23a95b892 100644 --- a/src/lib/eina/eina_freeq.h +++ b/src/lib/eina/eina_freeq.h @@ -62,18 +62,18 @@ * will be filled with this pattern value in every byte. The default value * is 0x77 (119). Memory is only filled if the size of the allocation is * less than the max that you can adjust with EINA_FREEQ_FILL_MAX. - * + * * @{ * * @since 1.19 - * + * * @typedef Eina_FreeQ * * A queue of pointers to free in the future. You may create custom free * queues of your own to defer freeing, use the main free queue where the * mainloop will free things as it iterates, or eina will free everything * on shut down. - * + * */ typedef struct _Eina_FreeQ Eina_FreeQ; @@ -133,7 +133,7 @@ eina_freeq_new(Eina_FreeQ_Type type); * @brief Free a free queue and anything that is queued in it. * * @param[in,out] fq The free queue to free and clear. - * + * * @since 1.19 */ EAPI void @@ -153,7 +153,7 @@ eina_freeq_type_get(Eina_FreeQ *fq); * @brief Get the main loop free queue. * * @return The main loop free queue. - * + * * @since 1.19 */ EAPI Eina_FreeQ * @@ -185,7 +185,7 @@ eina_freeq_count_max_set(Eina_FreeQ *fq, int count); * * @param[in] fq The free queue to query * @return The maximum number of free items allowed or -1 for infinity - * + * * @since 1.19 */ EAPI int @@ -207,7 +207,7 @@ eina_freeq_count_max_get(Eina_FreeQ *fq); * * @note Setting a memory limit on a postponed free queue leads to undefined * behavior. - * + * * @since 1.19 */ EAPI void @@ -232,7 +232,7 @@ eina_freeq_mem_max_get(Eina_FreeQ *fq); * This will free and thus remove all queued items from the free queue when * this function is called. When it returns the free queue should be * empty. - * + * * @since 1.19 */ EAPI void @@ -248,7 +248,7 @@ eina_freeq_clear(Eina_FreeQ *fq); * and thus reduce the amount of memory it is holding on to. This function * will return once it has removed @p count items or there are no more items * to remove from the queue. - * + * * @since 1.19 */ EAPI void @@ -259,7 +259,7 @@ eina_freeq_reduce(Eina_FreeQ *fq, int count); * * @param[in] fq The free queue to query * @return EINA_TRUE if there are items to free, EINA_FALSE otherwise - * + * * @since 1.19 */ EAPI Eina_Bool @@ -303,7 +303,7 @@ eina_freeq_ptr_pending(Eina_FreeQ *fq); * This note does not apply if you use a size of 0 for the pointer, but then * you lose canary debugging ability when using 0 sized pointers on the free * queue. - * + * * @since 1.19 */ EAPI void @@ -315,10 +315,10 @@ eina_freeq_ptr_add(Eina_FreeQ *fq, void *ptr, void (*free_func) (void *ptr), siz * @param[in] ptr The pointer to free * @param[in] free_func The function used to free the pointer with * @param[in] size The size of the data the pointer points to - * + * * This is the same as eina_freeq_ptr_add() but the main free queue is * fetched by eina_freeq_main_get(). - * + * * @since 1.19 */ static inline void @@ -331,12 +331,12 @@ eina_freeq_ptr_main_add(void *ptr, void (*free_func) (void *ptr), size_t size) * @brief Convenience macro for well known structures and types * * @param[in] ptr The pointer to free - * + * * This is the same as eina_freeq_ptr_main_add() but the free function is * assumed to be the libc free() function, and size is provided by * sizeof(*ptr), so it will not work on void pointers or will be inaccurate * for pointers to arrays. For arrays please use EINA_FREEQ_ARRAY_FREE() - * + * * @since 1.19 */ #define EINA_FREEQ_FREE(ptr) eina_freeq_ptr_main_add(ptr, NULL, sizeof(*(ptr))) @@ -345,12 +345,12 @@ eina_freeq_ptr_main_add(void *ptr, void (*free_func) (void *ptr), size_t size) * @brief Convenience macro for well known structures and types * * @param[in] ptr The pointer to free - * + * * This is the same as eina_freeq_ptr_main_add() but the free function is * assumed to be the libc free() function, and size is provided by * sizeof(*ptr), so it will not work on void pointers. Total size is multiplied * by the count @p n so it should work well for arrays of types. - * + * * @since 1.19 */ #define EINA_FREEQ_N_FREE(ptr, n) eina_freeq_ptr_main_add(ptr, NULL, sizeof(*(ptr)) * n) diff --git a/src/lib/eina/eina_log.h b/src/lib/eina/eina_log.h index b45a191ac2..417e38c436 100644 --- a/src/lib/eina/eina_log.h +++ b/src/lib/eina/eina_log.h @@ -545,13 +545,13 @@ static inline Eina_Bool eina_log_level_check(int level); * @brief Checks if current thread is the main thread. * * If there is no thread support (compiled with --disable-pthreads) or - * threads were not enabled, then #EINA_TRUE is returned. The only case where - * #EINA_FALSE is returned is when threads were successfully enabled but the - * current thread is not the one that called eina_log_threads_init() (the + * threads were not enabled, then #EINA_TRUE is returned. The only case where + * #EINA_FALSE is returned is when threads were successfully enabled but the + * current thread is not the one that called eina_log_threads_init() (the * main thread). - * - * @return #EINA_TRUE if the current thread is the one that called - * eina_log_threads_init(), otherwise #EINA_FALSE. + * + * @return #EINA_TRUE if the current thread is the one that called + * eina_log_threads_init(), otherwise #EINA_FALSE. */ EAPI Eina_Bool eina_log_main_thread_check(void) EINA_CONST EINA_WARN_UNUSED_RESULT; @@ -984,7 +984,7 @@ EAPI extern const char *_eina_log_state_init; EAPI extern const char *_eina_log_state_shutdown; /** * @def EINA_LOG_STATE_INIT - * String that indicates the log system is initializing + * String that indicates the log system is initializing */ #define EINA_LOG_STATE_INIT _eina_log_state_init /** diff --git a/src/lib/eina/eina_matrixsparse.c b/src/lib/eina/eina_matrixsparse.c index 9716a2cbd5..f0ca6daf46 100644 --- a/src/lib/eina/eina_matrixsparse.c +++ b/src/lib/eina/eina_matrixsparse.c @@ -941,7 +941,7 @@ eina_matrixsparse_new(unsigned long rows, unsigned long cols, void (*free_func)( if (!m) return NULL; EINA_MAGIC_SET(m, EINA_MAGIC_MATRIXSPARSE); - + m->rows = NULL; m->last_row = NULL; m->last_used = NULL; diff --git a/src/lib/eina/eina_mmap.c b/src/lib/eina/eina_mmap.c index 23386dac1d..af971e30f1 100644 --- a/src/lib/eina/eina_mmap.c +++ b/src/lib/eina/eina_mmap.c @@ -229,7 +229,7 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled) } signal(SIGBUS, SIG_DFL); } -done: +done: mmap_safe = enabled; return mmap_safe; #endif diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h index cad96b4049..0a4bce1786 100644 --- a/src/lib/eina/eina_promise.h +++ b/src/lib/eina/eina_promise.h @@ -66,7 +66,7 @@ typedef struct _Eina_Future_Cb_Log_Desc Eina_Future_Cb_Log_Desc; /** * @typedef Eina_Future_Cb - + * A callback used to inform that a future was resolved. * Usually this callback is called from a clean context, that is, from the * main loop or some platform defined safe context. However there are diff --git a/src/lib/eina/eina_rbtree.c b/src/lib/eina/eina_rbtree.c index 24d5b99a00..5fd935d687 100644 --- a/src/lib/eina/eina_rbtree.c +++ b/src/lib/eina/eina_rbtree.c @@ -476,7 +476,7 @@ eina_rbtree_inline_remove(Eina_Rbtree *root, rt = (*rt)->son + dir; } - if (q != NULL) + if (q != NULL) { int r_color = r->color; Eina_Rbtree *nd = q->son[dir ^ 1]; diff --git a/src/lib/eina/eina_strbuf_common.c b/src/lib/eina/eina_strbuf_common.c index 9a1d27d8ce..5cf7276c5f 100644 --- a/src/lib/eina/eina_strbuf_common.c +++ b/src/lib/eina/eina_strbuf_common.c @@ -217,7 +217,7 @@ _eina_strbuf_common_insert_length(size_t csize, return EINA_FALSE; /* move the existing text */ - memmove(((unsigned char *)(buf->buf)) + ((len + pos) * csize), + memmove(((unsigned char *)(buf->buf)) + ((len + pos) * csize), ((unsigned char *)(buf->buf)) + (pos * csize), (buf->len - pos) * csize); @@ -484,7 +484,7 @@ eina_strbuf_common_append(size_t csize, if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) return EINA_FALSE; - memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, (len + 1) * csize); buf->len += len; return EINA_TRUE; @@ -525,7 +525,7 @@ eina_strbuf_common_append_n(size_t csize, if (len > maxlen) len = maxlen; if (EINA_UNLIKELY(!_eina_strbuf_common_grow(csize, buf, buf->len + len))) return EINA_FALSE; - memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, + memcpy(((unsigned char *)(buf->buf)) + (buf->len * csize), str, len * csize); buf->len += len; memset(((unsigned char *)(buf->buf)) + (buf->len * csize), 0, csize); @@ -969,7 +969,7 @@ eina_strbuf_replace(Eina_Strbuf *buf, if (EINA_UNLIKELY(!_eina_strbuf_common_grow(_STRBUF_CSIZE, buf, buf->len - len1 + len2))) return EINA_FALSE; /* move the existing text */ - memmove(((unsigned char *)(buf->buf)) + pos + len2, + memmove(((unsigned char *)(buf->buf)) + pos + len2, ((unsigned char *)(buf->buf)) + pos + len1, buf->len - pos - len1); } diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c index dc186175c4..369711f2d8 100644 --- a/src/lib/eina/eina_thread.c +++ b/src/lib/eina/eina_thread.c @@ -65,7 +65,7 @@ _eina_thread_create(Eina_Thread *t, int affinity, void *(*func)(void *data), voi #ifndef _WIN32 sigset_t oldset, newset; #endif - + pthread_attr_init(&attr); if (affinity >= 0) { diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c index c4c04d8641..46a5ba9cab 100644 --- a/src/lib/eina/eina_tiler.c +++ b/src/lib/eina/eina_tiler.c @@ -1101,7 +1101,7 @@ static Eina_Bool _iterator_next(Eina_Iterator_Tiler *it, void **data) it->r.x = cur.left; it->r.y = cur.top; it->r.w = cur.width; - it->r.h = cur.height; + it->r.h = cur.height; } if (eina_rectangle_intersection(&it->r, &it->tiler->area) == EINA_FALSE) @@ -1614,7 +1614,7 @@ eina_tile_grid_slicer_iterator_new(int x, { Eina_Tile_Grid_Slicer_Iterator *it; - if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) || + if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (tile_w <= 0) || (tile_h <= 0)) return NULL; diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c index b71fa7da96..59262a6b08 100644 --- a/src/lib/eina/eina_value.c +++ b/src/lib/eina/eina_value.c @@ -2266,7 +2266,7 @@ _eina_value_type_string_vset(const Eina_Value_Type *type EINA_UNUSED, void *mem, { char **tmem = mem; const char *str = va_arg(args, const char *); - + if (str == *tmem) return EINA_TRUE; if (!str) { @@ -2291,7 +2291,7 @@ _eina_value_type_string_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem, { char **tmem = mem; const char * const *str = ptr; - + if (*str == *tmem) return EINA_TRUE; if (!*str) { @@ -4613,7 +4613,7 @@ eina_value_optional_pset(Eina_Value *value, const void *subvalue) EINA_ARG_NONNULL(1, 2, 3) { eina_value_optional_reset(value); - + if(sizeof(Eina_Value_Optional_Outer) <= sizeof(Eina_Value_Union)) { Eina_Value_Optional_Outer outer; @@ -4721,7 +4721,7 @@ _eina_value_type_optional_compare(const Eina_Value_Type *type EINA_UNUSED, const { Eina_Value_Optional_Inner const * const* lhs_p = lhs_raw; Eina_Value_Optional_Inner const * const* rhs_p = rhs_raw; - + if(!*lhs_p) return *rhs_p ? -1 : 0; else if(!*rhs_p) diff --git a/src/lib/eina/eina_value.h b/src/lib/eina/eina_value.h index 6197f7ce4d..ae199c019b 100644 --- a/src/lib/eina/eina_value.h +++ b/src/lib/eina/eina_value.h @@ -213,7 +213,7 @@ * Next we have setting, this however requires not one but rather two functions, * the reason for this is because to be able to receive arguments of any type * eina value uses - * variadic functions, so we need a function to get the argument from a + * variadic functions, so we need a function to get the argument from a * va_list and another to actually to the setting. * * Lets first look at the pset function which sets the received value to a