comparison src/main.c @ 995:6ca2c5fd7b13

Whitespaces cleanup.
author zas_
date Mon, 25 Aug 2008 22:20:45 +0000
parents c414002a1f27
children 4fe8f9656107
comparison
equal deleted inserted replaced
994:c879a4c14f33 995:6ca2c5fd7b13
76 g_assert(g_utf8_validate(s1, -1, NULL)); 76 g_assert(g_utf8_validate(s1, -1, NULL));
77 g_assert(g_utf8_validate(s2, -1, NULL)); 77 g_assert(g_utf8_validate(s2, -1, NULL));
78 78
79 if (!case_sensitive) 79 if (!case_sensitive)
80 { 80 {
81 s1_t = g_utf8_casefold(s1, -1); 81 s1_t = g_utf8_casefold(s1, -1);
82 s2_t = g_utf8_casefold(s2, -1); 82 s2_t = g_utf8_casefold(s2, -1);
83 } 83 }
84 84
85 s1_key = g_utf8_collate_key(s1_t, -1); 85 s1_key = g_utf8_collate_key(s1_t, -1);
86 s2_key = g_utf8_collate_key(s2_t, -1); 86 s2_key = g_utf8_collate_key(s2_t, -1);
111 111
112 if (filename[0] != '~') 112 if (filename[0] != '~')
113 return g_strdup(filename); 113 return g_strdup(filename);
114 114
115 notilde = filename + 1; 115 notilde = filename + 1;
116 slash = strchr(notilde, G_DIR_SEPARATOR); 116 slash = strchr(notilde, G_DIR_SEPARATOR);
117 if (slash == notilde || !*notilde) 117 if (slash == notilde || !*notilde)
118 { 118 {
119 home = g_get_home_dir(); 119 home = g_get_home_dir();
120 if (!home) 120 if (!home)
121 return g_strdup(filename); 121 return g_strdup(filename);
122 } 122 }
123 else 123 else
124 { 124 {
125 gchar *username; 125 gchar *username;
126 struct passwd *passwd; 126 struct passwd *passwd;
127 127
128 if (slash) 128 if (slash)
129 username = g_strndup(notilde, slash - notilde); 129 username = g_strndup(notilde, slash - notilde);
130 else 130 else
131 username = g_strdup(notilde); 131 username = g_strdup(notilde);
678 #ifdef ENABLE_NLS 678 #ifdef ENABLE_NLS
679 bindtextdomain(PACKAGE, GQ_LOCALEDIR); 679 bindtextdomain(PACKAGE, GQ_LOCALEDIR);
680 bind_textdomain_codeset(PACKAGE, "UTF-8"); 680 bind_textdomain_codeset(PACKAGE, "UTF-8");
681 textdomain(PACKAGE); 681 textdomain(PACKAGE);
682 #endif 682 #endif
683 683
684 /* setup random seed for random slideshow */ 684 /* setup random seed for random slideshow */
685 srand(time(NULL)); 685 srand(time(NULL));
686 686
687 #if 1 687 #if 1
688 log_printf("%s %s, This is an alpha release.\n", GQ_APPNAME, VERSION); 688 log_printf("%s %s, This is an alpha release.\n", GQ_APPNAME, VERSION);