gchar historystr[30];
gchar historystr[31];
GjitenConfig *conf_load() {  gchar dicprefix[] = "/apps/gjiten/general/dic";  gchar *tmpstrg;  gchar historystr[30];  gchar *tmpptr, *endptr;  gchar gnomekcfg[] = "/apps/gjiten/kanjidic/";  int i;	GjitenDicfile *dicfile;	GSList *gconf_diclist = NULL;	GSList *diclist;	GjitenConfig *conf;	conf = g_new0(GjitenConfig, 1);  conf->version = gconf_client_get_string(gconf_client, "/apps/gjiten/general/version", NULL);	/*  if (conf->version == NULL) { // FIXME: gconf schema    conf->kdiccfg[KANJI] = TRUE;     conf->kdiccfg[RADICAL] = TRUE;    conf->kdiccfg[STROKES] = TRUE;    conf->kdiccfg[READING] = TRUE;    conf->kdiccfg[ENGLISH] = TRUE;    conf->kdiccfg[FREQ] = TRUE;       conf->kdiccfg[JOUYOU] = TRUE;    conf->kdiccfg[CREF] = TRUE;		conf->toolbar = TRUE;    conf->menubar = TRUE;    conf->force_ja_JP = TRUE;    conf->force_language_c = TRUE;		if (conf->kanjidic == NULL) conf->kanjidic = g_new0(GjitenDicfile, 1);		conf->kanjidic->path = GJITEN_DICDIR"/kanjidic";    conf->dictpath = GJITEN_DICDIR;    conf->searchlimit_enabled = FALSE;    conf->maxwordmatches = DEFMAXWORDMATCHES;    conf->autoadjust_enabled = TRUE;    return conf;   }	*/  conf->autoadjust_enabled = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/autoadjust_enabled", NULL);  conf->bigwords = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/bigwords", NULL);  conf->bigkanji = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/bigkanji", NULL);  conf->largefont = gconf_client_get_string(gconf_client, "/apps/gjiten/general/largefont", NULL);  conf->normalfont = gconf_client_get_string(gconf_client, "/apps/gjiten/general/normalfont", NULL);  conf->gdk_use_xft = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/gdk_use_xft", NULL);  conf->force_ja_JP = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/force_ja_JP", NULL);  conf->force_language_c = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/force_language_c", NULL);  conf->envvar_override = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/envvar_override", NULL);  conf->searchlimit_enabled = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/searchlimit_enabled", NULL);  conf->maxwordmatches = gconf_client_get_int(gconf_client, "/apps/gjiten/general/maxwordmatches", NULL);	if (conf->maxwordmatches < 1) {		conf->searchlimit_enabled = FALSE;		conf->maxwordmatches = 100;	}  conf->dictpath = gconf_client_get_string(gconf_client, "/apps/gjiten/general/dictpath", NULL);  conf->menubar = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/menubar", NULL);  conf->toolbar = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/toolbar", NULL);  conf->search_kata_on_hira = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/search_kata_on_hira", NULL);  conf->search_hira_on_kata = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/search_hira_on_kata", NULL);  conf->verb_deinflection = gconf_client_get_bool(gconf_client, "/apps/gjiten/general/deinflection_enabled", NULL);  if (conf->kanjidic == NULL) conf->kanjidic = g_new0(GjitenDicfile, 1);  conf->kanjidic->path = gconf_client_get_string(gconf_client, "/apps/gjiten/kanjidic/kanjidicfile", NULL);	if ((conf->kanjidic->path == NULL) || (strlen(conf->kanjidic->path)) == 0) {		conf->kanjidic->path = GJITEN_DICDIR"/kanjidic";	}  conf->unicode_radicals = gconf_client_get_bool(gconf_client, "/apps/gjiten/kanjidic/unicode_radicals", NULL);	  conf->kanjipad = gconf_client_get_string(gconf_client, "/apps/gjiten/general/kanjipad", NULL);	if (conf->kanjipad == NULL) conf->kanjipad = "";  conf->numofdics = gconf_client_get_int(gconf_client, "/apps/gjiten/general/numofdics", NULL);	if (conf->dicfile_list != NULL) {		dicutil_unload_dic();		dicfile_list_free(conf->dicfile_list);		conf->dicfile_list = NULL;	}	if (conf->numofdics != 0) {		//Load dicfiles from old style config [compatibility with older versions]		for (i = 0; i < conf->numofdics; i++) {			//if (i == MAXDICFILES - 1) break;			tmpstrg = g_strdup_printf("%s%d", dicprefix, i); 			dicfile = g_new0(GjitenDicfile, 1);			dicfile->name = gconf_client_get_string(gconf_client, tmpstrg, NULL);			if (conf->dictpath[strlen(conf->dictpath - 1)] == '/') {				dicfile->path = g_strdup_printf("%s%s", conf->dictpath, dicfile->name);			}			else {				dicfile->path = g_strdup_printf("%s/%s", conf->dictpath, dicfile->name);			}			conf->dicfile_list = g_slist_append(conf->dicfile_list, dicfile);			g_free(tmpstrg);		}	}	else { //new config		gconf_diclist = gconf_client_get_list(gconf_client, GCONF_PATH_GENERAL"/dictionary_list", GCONF_VALUE_STRING, NULL);		diclist = gconf_diclist;		while (diclist != NULL) {			if (diclist->data == NULL) break;			tmpstrg = diclist->data;			if (tmpstrg != NULL) {				tmpptr = tmpstrg;				endptr = tmpptr + strlen(tmpstrg);				while ((tmpptr != endptr) && (*tmpptr != '\n')) tmpptr++;				if (*tmpptr == '\n') {					*tmpptr = 0;					tmpptr++;				}				dicfile = g_new0(GjitenDicfile, 1);				dicfile->path = g_strdup(tmpstrg);				dicfile->name = g_strdup(tmpptr);				//				printf("%s\n%s\n", tmpstrg, tmpptr);				conf->dicfile_list = g_slist_append(conf->dicfile_list, dicfile);			}			diclist = g_slist_next(diclist);		}	}	if (conf->dicfile_list != NULL) conf->selected_dic = conf->dicfile_list->data;  //Load kanji info settings  for (i = 0; i < KCFGNUM; i++) { 	  tmpptr = g_malloc(strlen(gnomekcfg) + strlen(kanjidicstrg[i]) + 1); //FIXME: g_strdup_printf		  strcpy(tmpptr, gnomekcfg);    strcat(tmpptr, kanjidicstrg[i]);    if (gconf_client_get_bool(gconf_client, tmpptr, NULL)) {      conf->kdiccfg[i] = TRUE;      /* printf("%s : %d\n",kanjidicstrg[i], conf->kdiccfg[i]); */    }    else conf->kdiccfg[i] = FALSE;     g_free(tmpptr);  }   //Load gjiten search history  for (i = 0; i <= 50; i++) {    sprintf(historystr, "/apps/gjiten/history/history%d", i);    conf->history[i] = gconf_client_get_string(gconf_client, historystr, NULL);    if (conf->history[i] == NULL) break;  }  return conf;}