* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "main.h"
#include "filedata.h"
-#include "filefilter.h"
+#include <config.h>
+
#include "cache.h"
-#include "thumb-standard.h"
-#include "ui-fileops.h"
-#include "metadata.h"
-#include "trash.h"
+#include "debug.h"
+#include "filefilter.h"
#include "histogram.h"
+#include "intl.h"
+#include "main-defines.h"
+#include "main.h"
+#include "metadata.h"
+#include "options.h"
#include "secure-save.h"
+#include "thumb-standard.h"
+#include "trash.h"
+#include "ui-fileops.h"
#include "exif.h"
#include "misc.h"
#include <grp.h>
+#include <pwd.h>
#ifdef DEBUG_FILEDATA
gint global_file_data_count = 0;
gchar *text_from_size(gint64 size)
{
- gchar *a, *b;
- gchar *s, *d;
- gint l, n, i;
+ gchar *a;
+ gchar *b;
+ gchar *s;
+ gchar *d;
+ gint l;
+ gint n;
+ gint i;
/* what I would like to use is printf("%'d", size)
* BUT: not supported on every libc :(
file_data_set_collate_keys(fd);
return;
}
- else if (strcmp(fd->name, ".") == 0)
+
+ if (strcmp(fd->name, ".") == 0)
{
g_free(fd->path);
fd->path = remove_level_from_path(path);
if (tmp)
{
struct tm time_str;
- uint year, month, day, hour, min, sec;
+ uint year;
+ uint month;
+ uint day;
+ uint hour;
+ uint min;
+ uint sec;
sscanf(tmp, "%4u:%2u:%2u %2u:%2u:%2u", &year, &month, &day, &hour, &min, &sec);
time_str.tm_year = year - 1900;
if (tmp)
{
struct tm time_str;
- uint year, month, day, hour, min, sec;
+ uint year;
+ uint month;
+ uint day;
+ uint hour;
+ uint min;
+ uint sec;
sscanf(tmp, "%4u:%2u:%2u %2u:%2u:%2u", &year, &month, &day, &hour, &min, &sec);
time_str.tm_year = year - 1900;
while (files)
{
- FileData *file = static_cast<FileData *>(files->data);
+ auto *file = static_cast<FileData *>(files->data);
read_exif_time_data(file);
files = files->next;
while (files)
{
- FileData *file = static_cast<FileData *>(files->data);
+ auto *file = static_cast<FileData *>(files->data);
read_exif_time_digitized_data(file);
files = files->next;
while (files)
{
- FileData *file = static_cast<FileData *>(files->data);
+ auto *file = static_cast<FileData *>(files->data);
rating_str = metadata_read_string(file, RATING_KEY, METADATA_PLAIN);
if (rating_str )
{
/* all files in the list have ref count > 0 */
const GList *work;
- GList *s_work, *new_sidecars;
+ GList *s_work;
+ GList *new_sidecars;
FileData *parent_fd;
if (!basename_list) return;
{
if (isdir(fd->path) && !islink(fd->path))
return rmdir_utf8(fd->path);
- else
- if (options->file_ops.safe_delete_enable)
- return file_util_safe_unlink(fd->path);
- else
- return unlink_file(fd->path);
+
+ if (options->file_ops.safe_delete_enable)
+ return file_util_safe_unlink(fd->path);
+
+ return unlink_file(fd->path);
}
gboolean file_data_perform_ci(FileData *fd)
#pragma GCC diagnostic ignored "-Wunused-function"
gboolean file_data_send_notification_idle_cb_unused(gpointer data)
{
- NotifyIdleData *nid = (NotifyIdleData *)data;
+ auto *nid = (NotifyIdleData *)data;
GList *work = notify_func_list;
while (work)
{
- NotifyData *nd = (NotifyData *)work->data;
+ auto *nd = (NotifyData *)work->data;
nd->func(nid->fd, nid->type, nd->data);
work = work->next;