Mercurial > geeqie
comparison src/ui_fileops.c @ 442:4b2d7f9af171
Big whitespaces cleanup:
- drop whitespaces at end of lines
- convert eight spaces to tab at start of lines
- drop spurious spaces mixed with tabs
- remove empty lines at end of files
author | zas_ |
---|---|
date | Sun, 20 Apr 2008 13:04:57 +0000 |
parents | 6802aeeed196 |
children | ddabc4873a3f |
comparison
equal
deleted
inserted
replaced
441:08eb7137cd94 | 442:4b2d7f9af171 |
---|---|
32 | 32 |
33 /* | 33 /* |
34 *----------------------------------------------------------------------------- | 34 *----------------------------------------------------------------------------- |
35 * generic file information and manipulation routines (public) | 35 * generic file information and manipulation routines (public) |
36 *----------------------------------------------------------------------------- | 36 *----------------------------------------------------------------------------- |
37 */ | 37 */ |
38 | 38 |
39 | 39 |
40 | 40 |
41 void print_term(const gchar *text_utf8) | 41 void print_term(const gchar *text_utf8) |
42 { | 42 { |
224 } | 224 } |
225 | 225 |
226 gint isdir(const gchar *s) | 226 gint isdir(const gchar *s) |
227 { | 227 { |
228 struct stat st; | 228 struct stat st; |
229 | 229 |
230 return (stat_utf8(s ,&st) && S_ISDIR(st.st_mode)); | 230 return (stat_utf8(s ,&st) && S_ISDIR(st.st_mode)); |
231 } | 231 } |
232 | 232 |
233 gint islink(const gchar *s) | 233 gint islink(const gchar *s) |
234 { | 234 { |
235 struct stat st; | 235 struct stat st; |
236 | 236 |
237 return (lstat_utf8(s ,&st) && S_ISLNK(st.st_mode)); | 237 return (lstat_utf8(s ,&st) && S_ISLNK(st.st_mode)); |
238 } | 238 } |
239 | 239 |
240 gint64 filesize(const gchar *s) | 240 gint64 filesize(const gchar *s) |
241 { | 241 { |
242 struct stat st; | 242 struct stat st; |
243 | 243 |
244 if (!stat_utf8(s, &st)) return 0; | 244 if (!stat_utf8(s, &st)) return 0; |
245 return (gint)st.st_size; | 245 return (gint)st.st_size; |
246 } | 246 } |
247 | 247 |
248 time_t filetime(const gchar *s) | 248 time_t filetime(const gchar *s) |
249 { | 249 { |
250 struct stat st; | 250 struct stat st; |
251 | 251 |
252 if (!stat_utf8(s, &st)) return 0; | 252 if (!stat_utf8(s, &st)) return 0; |
253 return st.st_mtime; | 253 return st.st_mtime; |
254 } | 254 } |
255 | 255 |
609 | 609 |
610 work = list; | 610 work = list; |
611 while (work) | 611 while (work) |
612 { | 612 { |
613 gchar *path; | 613 gchar *path; |
614 | 614 |
615 path = work->data; | 615 path = work->data; |
616 work = work->next; | 616 work = work->next; |
617 | 617 |
618 new_list = g_list_prepend(new_list, g_strdup(path)); | 618 new_list = g_list_prepend(new_list, g_strdup(path)); |
619 } | 619 } |
620 | 620 |
621 return g_list_reverse(new_list); | 621 return g_list_reverse(new_list); |
622 } | 622 } |
623 | 623 |
624 long checksum_simple(const gchar *path) | 624 long checksum_simple(const gchar *path) |
625 { | 625 { |