aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja6
-rw-r--r--src/main.c3
-rw-r--r--src/main.h1
-rw-r--r--src/utils.c14
-rw-r--r--src/utils.h7
-rw-r--r--src/xml.c2
7 files changed, 31 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 975a2dce..08815a15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-08-29
+ * src/main.[ch]
+ src/xml.c
+ src/utils.[ch]: made debug_mode static variable in utils.c.
+
+2005-08-29
+
* src/compose.c: compose_write_attach(): don't encode message/*
parts with quoted-printable or base64 (fixes broken attachments
on pgp-sign).
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 219e7006..e1bb438f 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,11 @@
2005-08-29
+ * src/main.[ch]
+ src/xml.c
+ src/utils.[ch]: debug_mode を utils.c 内の static な変数にした。
+
+2005-08-29
+
* src/compose.c: compose_write_attach(): message/* のパートを
quoted-printable または base64 でエンコードしないようにした
(pgp 署名時に添付ファイルが壊れるバグを修正)。
diff --git a/src/main.c b/src/main.c
index 0d9ef0b4..fac968a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -87,7 +87,6 @@
gchar *prog_version;
gchar *startup_dir;
-gboolean debug_mode = FALSE;
static gint lock_socket = -1;
static gint lock_socket_tag = 0;
@@ -403,7 +402,7 @@ static void parse_cmd_opt(int argc, char *argv[])
for (i = 1; i < argc; i++) {
if (!strncmp(argv[i], "--debug", 7))
- debug_mode = TRUE;
+ set_debug_mode(TRUE);
else if (!strncmp(argv[i], "--receive-all", 13))
cmd.receive_all = TRUE;
else if (!strncmp(argv[i], "--receive", 9))
diff --git a/src/main.h b/src/main.h
index 0fb8c56f..79c6abcd 100644
--- a/src/main.h
+++ b/src/main.h
@@ -25,7 +25,6 @@
extern gchar *prog_version;
extern gchar *startup_dir;
-extern gboolean debug_mode;
void app_will_exit (GtkWidget *widget, gpointer data);
diff --git a/src/utils.c b/src/utils.c
index a72b4e8a..f35f9075 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -57,7 +57,7 @@
#define BUFFSIZE 8192
-extern gboolean debug_mode;
+static gboolean debug_mode = FALSE;
#if !GLIB_CHECK_VERSION(2, 7, 0) && !defined(G_OS_UNIX)
@@ -3285,7 +3285,7 @@ void close_log_file(void)
static guint log_verbosity_count = 0;
-void log_verbosity_set(gboolean verbose)
+void set_log_verbosity(gboolean verbose)
{
if (verbose)
log_verbosity_count++;
@@ -3293,6 +3293,16 @@ void log_verbosity_set(gboolean verbose)
log_verbosity_count--;
}
+gboolean get_debug_mode(void)
+{
+ return debug_mode;
+}
+
+void set_debug_mode(gboolean enable)
+{
+ debug_mode = enable;
+}
+
void debug_print(const gchar *format, ...)
{
va_list args;
diff --git a/src/utils.h b/src/utils.h
index a42e2eb8..4e0c03aa 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -469,9 +469,12 @@ size_t my_strftime (gchar *s,
const struct tm *tm);
/* logging */
-void set_log_file (const gchar *filename);
+void set_log_file (const gchar *filename);
void close_log_file (void);
-void log_verbosity_set (gboolean verbose);
+void set_log_verbosity (gboolean verbose);
+gboolean get_debug_mode (void);
+void set_debug_mode (gboolean enable);
+
void debug_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
void log_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
void log_message (const gchar *format, ...) G_GNUC_PRINTF(1, 2);
diff --git a/src/xml.c b/src/xml.c
index 67c4ba1b..e9c4adf8 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -153,7 +153,7 @@ GNode *xml_parse_file(const gchar *path)
xml_close_file(file);
#if defined(SPARSE_MEMORY)
- if (debug_mode)
+ if (get_debug_mode())
string_table_get_stats(xml_string_table);
#endif