From 3ade071f273aaa973e44bf95d6b1d4913a18f03b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:39:48 +0200 Subject: Adding upstream version 43.2. Signed-off-by: Daniel Baumann --- src/nautilus-profile.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 src/nautilus-profile.c (limited to 'src/nautilus-profile.c') diff --git a/src/nautilus-profile.c b/src/nautilus-profile.c new file mode 100644 index 0000000..3f6c640 --- /dev/null +++ b/src/nautilus-profile.c @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2005 William Jon McCann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * Authors: William Jon McCann + * + */ + +#include "config.h" + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "nautilus-profile.h" + +void +_nautilus_profile_log (const char *func, + const char *note, + const char *format, + ...) +{ + va_list args; + char *str; + char *formatted; + + if (format == NULL) + { + formatted = g_strdup (""); + } + else + { + va_start (args, format); + formatted = g_strdup_vprintf (format, args); + va_end (args); + } + + if (func != NULL) + { + str = g_strdup_printf ("MARK: %s %s: %s %s", g_get_prgname (), func, note ? note : "", formatted); + } + else + { + str = g_strdup_printf ("MARK: %s: %s %s", g_get_prgname (), note ? note : "", formatted); + } + + g_free (formatted); + + g_access (str, F_OK); + g_free (str); +} -- cgit v1.2.3