[Kazehakase-cvs] CVS update: kazehakase/src

Back to archive index

Ryo SHIMIZU furyo****@users*****
Thu Feb 23 22:32:11 JST 2006


Index: kazehakase/src/kazehakase.h
diff -u kazehakase/src/kazehakase.h:1.34 kazehakase/src/kazehakase.h:1.35
--- kazehakase/src/kazehakase.h:1.34	Mon Jan 23 12:06:28 2006
+++ kazehakase/src/kazehakase.h	Thu Feb 23 22:32:11 2006
@@ -36,8 +36,12 @@
 
 #define KAZEHAKASE_URI "http://kazehakase.sourceforge.jp/"
 
-#define HISTORY_INDEX "/."PACKAGE"/history_index.hest"
 #define HISTORY_DIR   "/."PACKAGE"/history/"
+#if USE_HYPERESTRAIER
+#	define HISTORY_INDEX "/."PACKAGE"/history_index.hest"
+#elif USE_RAST
+#	define HISTORY_INDEX "/."PACKAGE"/history_index.rast"
+#endif
 
 
 typedef enum {
@@ -63,7 +67,7 @@
 #endif
 extern gboolean	       is_restoring_session;
 
-extern gboolean        exists_estcmd; 
+extern gboolean        exists_search_cmd; 
 
 #define KZ_CONF_GET(s, k, v, t)					\
 	kz_profile_get_value(kz_global_profile,			\
Index: kazehakase/src/main.c
diff -u kazehakase/src/main.c:1.108 kazehakase/src/main.c:1.109
--- kazehakase/src/main.c:1.108	Sun Feb 12 00:29:53 2006
+++ kazehakase/src/main.c	Thu Feb 23 22:32:11 2006
@@ -45,7 +45,13 @@
 #include "kz-ext.h"
 #include "locale.h"
 #include "utils.h"
-#include "estsearch.h"
+
+#if USE_HYPERESTRAIER
+#	include "estsearch.h"
+#elif USE_RAST
+#	include "rast-search.h"
+#endif
+
 #include "mozilla.h"
 #if (GLIB_MAJOR_VERSION == 2) && ((GLIB_MINOR_VERSION < 5) || \
 		((GLIB_MINOR_VERSION >= 5) && (GLIB_MICRO_VERSION < 4)))
@@ -77,7 +83,7 @@
 
 gboolean is_restoring_session = FALSE;
 
-gboolean exists_estcmd = FALSE;
+gboolean exists_search_cmd = FALSE;
 
 static void activate_action(const gchar *text);
 
@@ -520,8 +526,13 @@
 		purge_history_file(history_dir, limit_seconds);
 		g_free(history_dir);
 
-		if (exists_estcmd)
+		if (exists_search_cmd)
+		{
+#if USE_HYPERESTRAIER
 			estsearch_purge_index();
+#elif USE_RAST
+#endif
+		}
 	}
 }
 
@@ -559,8 +570,8 @@
 	gchar *smartbookmark_file, *sys_smartbookmark_file;
 	gchar *accel_prefs_file;
 	gchar *proxy_file, *sysproxy_file;
-	gchar *hest_command;
-	gboolean exists_estindex, use_history_search = FALSE;
+	gchar *search_command;
+	gboolean exists_index, use_history_search = FALSE;
 
 	/* load prefs */
 	sysconf_file = g_strdup(KZ_SYSCONFDIR "/kzrc");
@@ -574,15 +585,23 @@
 	KZ_CONF_GET("History", "store_cache", use_history_search, BOOL);
 	if (use_history_search)
 	{
-		hest_command = g_find_program_in_path("estcmd");
-		exists_estindex = estsearch_exist_index_dir();
-
-		if (hest_command)
+#if USE_HYPERESTRAIER
+		search_command = g_find_program_in_path("estcmd");
+		exists_index = estsearch_exist_index_dir();
+#elif USE_RAST
+		search_command = g_find_program_in_path("rast");
+		exists_index = rast_exist_index_dir();
+#endif
+		if (search_command)
 		{
-			exists_estcmd = TRUE;
-			if (!exists_estindex)
+			exists_search_cmd = TRUE;
+			if (!exists_index)
+#if USE_HYPERESTRAIER
 				estsearch_make_index();
-			g_free(hest_command);
+#elif USE_RAST
+				rast_make_index();
+#endif
+			g_free(search_command);
 		}
 	}
 


More information about the Kazehakase-cvs mailing list
Back to archive index