summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fr-archive.c8
-rw-r--r--src/fr-command-cfile.c4
-rw-r--r--src/fr-command.c8
-rw-r--r--src/fr-command.h5
-rw-r--r--src/fr-process.c5
-rw-r--r--src/fr-window.c16
-rw-r--r--src/glib-utils.c3
-rw-r--r--src/java-utils.c3
8 files changed, 33 insertions, 19 deletions
diff --git a/src/fr-archive.c b/src/fr-archive.c
index 2bbf4fa..cb7b168 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -693,8 +693,8 @@ action_started (FrCommand *command,
FrAction action,
FrArchive *archive)
{
-#ifdef DEBUG
- debug (DEBUG_INFO, "%s [START] (FR::Archive)\n", action_names[action]);
+#ifdef MATE_ENABLE_DEBUG
+ debug (DEBUG_INFO, "%s [START] (FR::Archive)\n", get_action_name (action));
#endif
g_signal_emit (G_OBJECT (archive),
@@ -930,8 +930,8 @@ action_performed (FrCommand *command,
FrProcError *error,
FrArchive *archive)
{
-#ifdef DEBUG
- debug (DEBUG_INFO, "%s [DONE] (FR::Archive)\n", action_names[action]);
+#ifdef MATE_ENABLE_DEBUG
+ debug (DEBUG_INFO, "%s [DONE] (FR::Archive)\n", get_action_name (action));
#endif
switch (action) {
diff --git a/src/fr-command-cfile.c b/src/fr-command-cfile.c
index fff8bfb..697d8ab 100644
--- a/src/fr-command-cfile.c
+++ b/src/fr-command-cfile.c
@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
+
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
@@ -76,7 +78,7 @@ get_uncompressed_name_from_archive (FrCommand *comm,
while (g_input_stream_read (stream, buffer, 1, NULL, NULL) > 0) {
if (buffer[0] == '\0') {
filename = g_strdup (file_name_from_path (str->str));
-#ifdef DEBUG
+#ifdef MATE_ENABLE_DEBUG
g_message ("filename is: %s", filename);
#endif
break;
diff --git a/src/fr-command.c b/src/fr-command.c
index 9077d18..dc372b0 100644
--- a/src/fr-command.c
+++ b/src/fr-command.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
@@ -79,6 +80,13 @@ const char *action_names[] = { "NONE",
"CREATING_ARCHIVE",
"SAVING_REMOTE_ARCHIVE" };
+#if MATE_ENABLE_DEBUG
+const char * get_action_name (FrAction action)
+{
+ return action_names[action];
+}
+#endif
+
GType
fr_command_get_type ()
{
diff --git a/src/fr-command.h b/src/fr-command.h
index 772189b..2924a5d 100644
--- a/src/fr-command.h
+++ b/src/fr-command.h
@@ -23,6 +23,7 @@
#ifndef FR_COMMAND_H
#define FR_COMMAND_H
+#include <config.h>
#include <glib.h>
#include "file-data.h"
#include "fr-process.h"
@@ -59,8 +60,8 @@ typedef enum {
FR_ACTION_SAVING_REMOTE_ARCHIVE /* copying the archive to a remote location */
} FrAction;
-#ifdef DEBUG
-extern char *action_names[];
+#if MATE_ENABLE_DEBUG
+const char * get_action_name (FrAction action);
#endif
struct _FrCommand
diff --git a/src/fr-process.c b/src/fr-process.c
index d82bacd..73395ad 100644
--- a/src/fr-process.c
+++ b/src/fr-process.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -739,7 +740,7 @@ start_current_command (FrProcess *process)
argv[i] = NULL;
-#ifdef DEBUG
+#ifdef MATE_ENABLE_DEBUG
{
int j;
@@ -946,7 +947,7 @@ check_child (gpointer data)
if (continue_process) {
if (process->error.type != FR_PROC_ERROR_NONE) {
allow_sticky_processes_only (process, TRUE);
-#ifdef DEBUG
+#ifdef MATE_ENABLE_DEBUG
{
GList *scan;
diff --git a/src/fr-window.c b/src/fr-window.c
index 99dc120..fc94f2e 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -2901,8 +2901,8 @@ action_started (FrArchive *archive,
window->priv->action = action;
fr_window_start_activity_mode (window);
-#ifdef DEBUG
- debug (DEBUG_INFO, "%s [START] (FR::Window)\n", action_names[action]);
+#ifdef MATE_ENABLE_DEBUG
+ debug (DEBUG_INFO, "%s [START] (FR::Window)\n", get_action_name (action));
#endif
message = get_action_description (action, window->priv->pd_last_archive);
@@ -3163,8 +3163,8 @@ convert__action_performed (FrArchive *archive,
{
FrWindow *window = data;
-#ifdef DEBUG
- debug (DEBUG_INFO, "%s [CONVERT::DONE] (FR::Window)\n", action_names[action]);
+#ifdef MATE_ENABLE_DEBUG
+ debug (DEBUG_INFO, "%s [CONVERT::DONE] (FR::Window)\n", get_action_name (action));
#endif
if ((action == FR_ACTION_GETTING_FILE_LIST) || (action == FR_ACTION_ADDING_FILES)) {
@@ -3203,8 +3203,8 @@ action_performed (FrArchive *archive,
char *archive_dir;
gboolean temp_dir;
-#ifdef DEBUG
- debug (DEBUG_INFO, "%s [DONE] (FR::Window)\n", action_names[action]);
+#ifdef MATE_ENABLE_DEBUG
+ debug (DEBUG_INFO, "%s [DONE] (FR::Window)\n", get_action_name (action));
#endif
fr_window_stop_activity_mode (window);
@@ -8118,8 +8118,8 @@ copy_from_archive_action_performed_cb (FrArchive *archive,
FrWindow *window = data;
gboolean UNUSED_VARIABLE continue_batch = FALSE;
-#ifdef DEBUG
- debug (DEBUG_INFO, "%s [DONE] (FR::Window)\n", action_names[action]);
+#ifdef MATE_ENABLE_DEBUG
+ debug (DEBUG_INFO, "%s [DONE] (FR::Window)\n", get_action_name (action));
#endif
fr_window_stop_activity_mode (window);
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 57298e4..cffa591 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
#include <string.h>
#include <stdio.h>
#include <glib.h>
@@ -472,7 +473,7 @@ debug (const char *file,
const char *function,
const char *format, ...)
{
-#ifdef DEBUG
+#ifdef MATE_ENABLE_DEBUG
va_list args;
char *str;
diff --git a/src/java-utils.c b/src/java-utils.c
index 1aed8a5..1efcb3f 100644
--- a/src/java-utils.c
+++ b/src/java-utils.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include <config.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
@@ -226,7 +227,7 @@ load_constant_pool_utfs (JavaClassFile *cfile)
i++;
}
-#ifdef DEBUG
+#ifdef MATE_ENABLE_DEBUG
g_print( "Number of Entries: %d\n", i );
#endif
}