CVS: sylpheedclaws/sylpheed-claws/src/common claws.c,NONE,1.1.4.1 claws.h,NONE,1.1.4.1 Makefile.am,1.24.2.10,1.24.2.10.10.1 ssl.c,1.9.2.15.4.1,1.9.2.15.4.2 sylpheed.c,1.7.2.9.2.1,NONE sylpheed.h,1.5.2.3.10.1,NONE

[email protected]
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/common
In directory sunsite.dk:/tmp/cvs-serv28725/src/common

Modified Files:
      Tag: stable_2_6
	Makefile.am ssl.c 
Added Files:
      Tag: stable_2_6
	claws.c claws.h 
Removed Files:
      Tag: stable_2_6
	sylpheed.c sylpheed.h 
Log Message:
2006-12-04 [paul]	2.6.0cvs25-stable

	* ChangeLog
	* Makefile.am
	* configure.ac
	* m4/aclocal-include.m4
	* m4/check-type.m4
	* src/Makefile.am
	* src/addr_compl.c
	* src/compose.c
	* src/crash.c
	* src/export.c
	* src/exporthtml.c
	* src/exportldif.c
	* src/imap.c
	* src/import.c
	* src/main.c
	* src/main.h
	* src/matcher.c
	* src/mimeview.c
	* src/procmsg.c
	* src/common/Makefile.am
	* src/common/claws.c
	* src/common/claws.h
	* src/common/ssl.c
	* src/common/sylpheed.c
	* src/common/sylpheed.h
	* src/etpan/Makefile.am
	* src/gtk/Makefile.am
	* src/gtk/claws-marshal.list
	* src/gtk/filesel.c
	* src/gtk/gtksctree.c
	* src/gtk/quicksearch.c
	* src/gtk/sylpheed-marshal.list
	* src/plugins/bogofilter/bogofilter.c
	* src/plugins/bogofilter/bogofilter_gtk.c
	* src/plugins/clamav/clamav_plugin.c
	* src/plugins/clamav/clamav_plugin_gtk.c
	* src/plugins/demo/demo.c
	* src/plugins/dillo_viewer/dillo_viewer.c
	* src/plugins/pgpcore/Makefile.am
	* src/plugins/pgpcore/claws.def
	* src/plugins/pgpcore/pgp_viewer.c
	* src/plugins/pgpcore/plugin.c
	* src/plugins/pgpcore/sylpheed.def
	* src/plugins/pgpinline/Makefile.am
	* src/plugins/pgpinline/claws.def
	* src/plugins/pgpinline/plugin.c
	* src/plugins/pgpinline/sylpheed.def
	* src/plugins/pgpmime/Makefile.am
	* src/plugins/pgpmime/claws.def
	* src/plugins/pgpmime/plugin.c
	* src/plugins/pgpmime/sylpheed.def
	* src/plugins/spamassassin/spamassassin.c
	* src/plugins/spamassassin/spamassassin_gtk.c
	* src/plugins/trayicon/trayicon.c
		backport from 2.6.0cvs64:
		yet more renaming 

--- NEW FILE: claws.c ---
/*
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 * Copyright (C) 1999,2000 Hiroyuki Yamamoto and the Claws Mail team
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include "defs.h"
#include <stdlib.h>
#include <glib.h>
#ifdef ENABLE_NLS
#include <glib/gi18n.h>
#else
#define _(a) (a)
#define N_(a) (a)
#endif

#if HAVE_LOCALE_H
#  include <locale.h>
#endif

#include "claws.h"
#include "utils.h"
#include "ssl.h"
#include "version.h"

static gboolean claws_initialized = FALSE;
static gchar *startup_dir;
static void (*claws_idle_function)(void) = NULL;

/**
 * Parse program parameters and remove all parameters
 * that have been processed. Arguments are pointers to
 * original passed programm arguments and these will
 * be modified leaving only unknown parameters for
 * further processing
 *
 * \param argc pointer to number of parameters
 * \param argv pointer to array of parameter strings
 */
static void parse_parameter(int *argc, char ***argv)
{
	gint i, j, k;

	g_return_if_fail(argc != NULL);
	g_return_if_fail(argv != NULL);

	for (i = 1; i < *argc;) {
		if (strcmp("--debug", (*argv)[i]) == 0) {
			debug_set_mode(TRUE);

			(*argv)[i] = NULL;
		}

		i += 1;
	}

	/* Remove NULL args from argv[] for further processing */
	for (i = 1; i < *argc; i++) {
		for (k = i; k < *argc; k++)
			if ((*argv)[k] != NULL)
				break;

		if (k > i) {
			k -= i;
			for (j = i + k; j < *argc; j++)
				(*argv)[j - k] = (*argv)[j];
			*argc -= k;
		}
	}
}

gboolean claws_init(int *argc, char ***argv)
{
	if (claws_initialized)
		return TRUE;

	startup_dir = g_get_current_dir();

	parse_parameter(argc, argv);

	debug_print("Starting Claws Mail version %08x\n", VERSION_NUMERIC);

	setlocale(LC_ALL, "");
#ifdef ENABLE_NLS
	bindtextdomain(PACKAGE, get_locale_dir () );
	bind_textdomain_codeset (PACKAGE, "UTF-8");
	textdomain(PACKAGE);
#endif /*ENABLE_NLS*/
	putenv("G_BROKEN_FILENAMES=1");

	/* backup if old rc file exists */
	if (is_file_exist(RC_DIR)) {
		if (rename(RC_DIR, RC_DIR ".bak") < 0) {
			FILE_OP_ERROR(RC_DIR, "rename");
			return FALSE;
		}
	}

	srand((gint) time(NULL));

#if USE_OPENSSL
	ssl_init();
#endif

	claws_initialized = TRUE;

	return TRUE;
}

void claws_done(void)
{

#if USE_OPENSSL
	ssl_done();
#endif
}

const gchar *claws_get_startup_dir(void)
{
	return startup_dir;
}

guint claws_get_version(void)
{
	return VERSION_NUMERIC;
}

void claws_register_idle_function	(void (*idle_func)(void))
{
	claws_idle_function = idle_func;
}

void claws_do_idle(void)
{
	if (claws_idle_function != NULL)
		claws_idle_function();
}

--- NEW FILE: claws.h ---
/*
 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 * Copyright (C) 1999,2000 Hiroyuki Yamamoto and the Claws Mail team
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef CLAWS_H
#define CLAWS_H

#include <glib.h>

gboolean claws_init			(int *argc, char ***argv);
void claws_done				(void);
const gchar *claws_get_startup_dir	(void);
guint claws_get_version			(void);
void claws_register_idle_function	(void (*idle_func)(void));
void claws_do_idle			(void);

#endif /* CLAWS_H */

Index: Makefile.am
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/common/Makefile.am,v
retrieving revision 1.24.2.10
retrieving revision 1.24.2.10.10.1
diff -u -d -r1.24.2.10 -r1.24.2.10.10.1
--- Makefile.am	2006/03/05 10:04:39	1.24.2.10
+++ Makefile.am	2006/12/04 14:22:02	1.24.2.10.10.1
@@ -1,5 +1,5 @@
 PLUGINDIR = $(pkglibdir)/plugins/
-noinst_LTLIBRARIES = libsylpheedcommon.la
+noinst_LTLIBRARIES = libclawscommon.la
 
 if OS_WIN32
 arch_sources = fnmatch.c \
@@ -12,7 +12,7 @@
 arch_header = 
 endif
 
-libsylpheedcommon_la_SOURCES = $(arch_sources) \
+libclawscommon_la_SOURCES = $(arch_sources) \
 	base64.c \
 	hooks.c \
 	log.c \
@@ -31,15 +31,15 @@
 	ssl_certificate.c \
 	string_match.c \
 	stringtable.c \
-	sylpheed.c \
+	claws.c \
 	template.c \
 	utils.c \
 	uuencode.c \
 	xml.c \
 	xmlprops.c
 
-sylpheedcommonincludedir = $(pkgincludedir)/common
-sylpheedcommoninclude_HEADERS = $(arch_headers) \
+clawscommonincludedir = $(pkgincludedir)/common
+clawscommoninclude_HEADERS = $(arch_headers) \
 	base64.h \
 	defs.h \
 	hooks.h \
@@ -59,7 +59,7 @@
 	ssl.h \
 	string_match.h \
 	stringtable.h \
-	sylpheed.h \
+	claws.h \
 	template.h \
 	timing.h \
 	utils.h \
@@ -77,7 +77,7 @@
 	-DLOCALEDIR=\""$(localedir)"\" \
 	-DPLUGINDIR=\"$(PLUGINDIR)\" 
 
-libsylpheedcommon_la_LIBADD = \
+libclawscommon_la_LIBADD = \
 	$(GLIB_LIBS) \
 	$(OPENSSL_LIBS) \
 	$(CRYPT_LIBS) \

Index: ssl.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/common/ssl.c,v
retrieving revision 1.9.2.15.4.1
retrieving revision 1.9.2.15.4.2
diff -u -d -r1.9.2.15.4.1 -r1.9.2.15.4.2
--- ssl.c	2006/11/24 13:13:02	1.9.2.15.4.1
+++ ssl.c	2006/12/04 14:22:02	1.9.2.15.4.2
@@ -28,7 +28,7 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 
-#include "sylpheed.h"
+#include "claws.h"
 #include "utils.h"
 #include "ssl.h"
 #include "ssl_certificate.h"
@@ -120,7 +120,7 @@
 	debug_print("waiting for SSL_connect thread...\n");
 	while(!td->done) {
 		/* don't let the interface freeze while waiting */
-		sylpheed_do_idle();
+		claws_do_idle();
 		if (time(NULL) - start_time > 30) {
 			pthread_cancel(pt);
 			td->done = TRUE;

--- sylpheed.c DELETED ---

--- sylpheed.h DELETED ---
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.