From 2e88dacb27287802cc7196d9f8f0b73621bd2b02 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 8 Oct 2010 19:04:34 +0000 Subject: [PATCH] whitespace cleanup, log domain to lowercase. SVN revision: 53200 --- src/bin/ephoto.c | 156 +++++++++++++++++++++++------------------------ 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/src/bin/ephoto.c b/src/bin/ephoto.c index 77517b8..251c311 100644 --- a/src/bin/ephoto.c +++ b/src/bin/ephoto.c @@ -5,101 +5,101 @@ static void _ephoto_display_usage(void); /* Global log domain pointer */ int __log_domain = -1; -int +int main(int argc, char **argv) { - Ethumb_Client *client; - int r = 0; + Ethumb_Client *client; + int r = 0; - elm_need_efreet(); - elm_need_ethumb(); - elm_init(argc, argv); + elm_need_efreet(); + elm_need_ethumb(); + elm_init(argc, argv); - if (!efreet_mime_init()) - fprintf(stderr, "Could not init efreet_mime!\n"); - - client = elm_thumb_ethumb_client_get(); - if (!client) - { - ERR("could not get ethumb_client"); - r = 1; - goto end_log_domain; - } - ethumb_client_size_set(client, 100, 100); - ethumb_client_crop_align_set(client, 0.5, 0.5); - ethumb_client_aspect_set(client, ETHUMB_THUMB_KEEP_ASPECT); - ethumb_client_orientation_set(client, ETHUMB_THUMB_ORIENT_ORIGINAL); - __log_domain = eina_log_domain_register("Ephoto", EINA_COLOR_BLUE); - if (!__log_domain) - { - EINA_LOG_ERR("Could not register log domain: Ephoto"); - r = 1; - goto end_log_domain; - } + if (!efreet_mime_init()) + fprintf(stderr, "Could not init efreet_mime!\n"); + + client = elm_thumb_ethumb_client_get(); + if (!client) + { + ERR("could not get ethumb_client"); + r = 1; + goto end_log_domain; + } + ethumb_client_size_set(client, 100, 100); + ethumb_client_crop_align_set(client, 0.5, 0.5); + ethumb_client_aspect_set(client, ETHUMB_THUMB_KEEP_ASPECT); + ethumb_client_orientation_set(client, ETHUMB_THUMB_ORIENT_ORIGINAL); + __log_domain = eina_log_domain_register("ephoto", EINA_COLOR_BLUE); + if (!__log_domain) + { + EINA_LOG_ERR("Could not register log domain: Ephoto"); + r = 1; + goto end_log_domain; + } - DBG("Logging initialized"); - if (argc > 2) - { - printf("Too Many Arguments!\n"); - _ephoto_display_usage(); - r = 1; - goto end; - } - else if (argc < 2) - { - ephoto_create_main_window(NULL, NULL); - } - else if (!strncmp(argv[1], "--help", 6)) - { - _ephoto_display_usage(); - r = 0; - goto end; - } - else if (ecore_file_is_dir(argv[1])) - { - char *real = ecore_file_realpath(argv[1]); - ephoto_create_main_window(real, NULL); - free(real); - } - else if (ecore_file_exists(argv[1])) - { - char *directory, *real; - const char *image; + DBG("Logging initialized"); + if (argc > 2) + { + printf("Too Many Arguments!\n"); + _ephoto_display_usage(); + r = 1; + goto end; + } + else if (argc < 2) + { + ephoto_create_main_window(NULL, NULL); + } + else if (!strncmp(argv[1], "--help", 6)) + { + _ephoto_display_usage(); + r = 0; + goto end; + } + else if (ecore_file_is_dir(argv[1])) + { + char *real = ecore_file_realpath(argv[1]); + ephoto_create_main_window(real, NULL); + free(real); + } + else if (ecore_file_exists(argv[1])) + { + char *directory, *real; + const char *image; - image = eina_stringshare_add(argv[1]); - directory = ecore_file_dir_get(argv[1]); - real = ecore_file_realpath(directory); - ephoto_create_main_window(real, image); - free(directory); - free(real); - } - else - { - printf("Incorrect Argument!\n"); - _ephoto_display_usage(); - r = 1; - goto end; - } + image = eina_stringshare_add(argv[1]); + directory = ecore_file_dir_get(argv[1]); + real = ecore_file_realpath(directory); + ephoto_create_main_window(real, image); + free(directory); + free(real); + } + else + { + printf("Incorrect Argument!\n"); + _ephoto_display_usage(); + r = 1; + goto end; + } - elm_run(); + elm_run(); end: - eina_log_domain_unregister(__log_domain); + eina_log_domain_unregister(__log_domain); end_log_domain: - efreet_mime_shutdown(); - elm_shutdown(); + efreet_mime_shutdown(); + elm_shutdown(); - return r; + return r; } /*Display useage commands for ephoto*/ static void _ephoto_display_usage(void) { - printf("Ephoto Useage: \n" - "ephoto --help : This page\n" - "ephoto filename : Specifies a file to open\n" - "ephoto dirname : Specifies a directory to open\n"); + printf("Ephoto Useage: \n" + "ephoto --help : This page\n" + "ephoto filename : Specifies a file to open\n" + "ephoto dirname : Specifies a directory to open\n"); }