diff options
Diffstat (limited to 'src/include')
-rwxr-xr-x | src/include/util/media-thumb-db.h | 6 | ||||
-rwxr-xr-x | src/include/util/media-thumb-debug.h | 19 |
2 files changed, 20 insertions, 5 deletions
diff --git a/src/include/util/media-thumb-db.h b/src/include/util/media-thumb-db.h index fc407fa..a4cfc52 100755 --- a/src/include/util/media-thumb-db.h +++ b/src/include/util/media-thumb-db.h @@ -36,11 +36,7 @@ sqlite3 *_media_thumb_db_get_handle(); int _media_thumb_db_connect(uid_t uid); int _media_thumb_db_disconnect(); -int _media_thumb_get_thumb_from_db_with_size(const char *origin_path, - char *thumb_path, - int max_length, - int *width, - int *height); +int _media_thumb_get_thumb_from_db_with_size(const char *origin_path, char *thumb_path, int max_length, int *width, int *height); int _media_thumb_update_db(const char *origin_path, char *thumb_path, int width, int height, uid_t uid); #endif /*_MEDIA_THUMB_DB_H_*/ diff --git a/src/include/util/media-thumb-debug.h b/src/include/util/media-thumb-debug.h index a4b4607..9cfbe2d 100755 --- a/src/include/util/media-thumb-debug.h +++ b/src/include/util/media-thumb-debug.h @@ -75,6 +75,25 @@ LOGE(FONT_COLOR_RED fmt" : standard error [%s]", strerror_r(errno, thumb_stderror_buffer, ERR_BUF_LENGHT)); \ } while (0) +#define thumb_retm_if(expr, fmt, arg...) do { \ + if (expr) { \ + LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + return; \ + } \ + } while (0) +#define thumb_retv_if(expr, val) do { \ + if (expr) { \ + LOGE(FONT_COLOR_RED""FONT_COLOR_RESET); \ + return (val); \ + } \ + } while (0) +#define thumb_retvm_if(expr, val, fmt, arg...) do { \ + if (expr) { \ + LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + return (val); \ + } \ + } while (0) + #ifdef _USE_LOG_FILE_ void thumb_init_file_debug(); void thumb_close_file_debug(); |