From 537c4b33fdf6e143243d5a0d286eeb247362e806 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 18 Jul 2005 15:22:28 +0000 Subject: API Improvements - Removed 'rlen' return parameters there not necessary for multibyte encodings - Two versions of recode functions: rccRecode -> rccRecode, rccSizedRecode - Class Types: CONST, SKIP_SAVELOAD - New recode functions: rccToCharset, rccFromCharset - More new recode functions: rccRecodeToCharset, rccRecodeFromCharset, rccRecodeCharsets - New function: rccGetCompiledConfiguration - All warnings are fixed - Perform "File Name" search only if there are non ISO8859-1 chars in the name. - Do not copy invalid characters, - skip them. - Fixed error in rccRecode with 'Recoding Cache' switched On. - Strip leading and trailing spaces in rccDB4 get/set --- ui/gtk.c | 4 ++-- ui/librccui.c | 6 ++++-- ui/rccmenu.c | 1 + ui/rccnames.c | 11 +---------- 4 files changed, 8 insertions(+), 14 deletions(-) (limited to 'ui') diff --git a/ui/gtk.c b/ui/gtk.c index da909eb..749405e 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -64,7 +64,7 @@ int rccUiMenuSet(rcc_ui_menu_context ctx, rcc_ui_id id) { } -static int rccGtkMenuLanguageCB(GtkWidget * w, gpointer item) { +static void rccGtkMenuLanguageCB(GtkWidget * w, gpointer item) { rccUiRestoreLanguage(((rcc_ui_menu_context)item)->uictx); } @@ -108,7 +108,7 @@ int rccUiMenuConfigureWidget(rcc_ui_menu_context ctx) { } language_id = rccGetSelectedLanguage(rccctx); - if (language_id < 0) language_id = 0; + if (language_id == (rcc_language_id)-1) language_id = 0; if (ctx->widget) menu = ctx->widget; else { diff --git a/ui/librccui.c b/ui/librccui.c index 608e04a..f072c6e 100644 --- a/ui/librccui.c +++ b/ui/librccui.c @@ -54,6 +54,7 @@ static const char *rccUiXmlGetText(xmlNodePtr node) { if ((node)&&(node->children)&&(node->children->type == XML_TEXT_NODE)&&(node->children->content)) return node->children->content; + return NULL; } static xmlNodePtr rccUiNodeFind(xmlXPathContextPtr xpathctx, const char *request, ...) { @@ -178,7 +179,7 @@ int rccUiInit() { xmlDocPtr xmlctx; xmlXPathContextPtr xpathctx = NULL; xmlXPathObjectPtr obj; - xmlNodeSetPtr node_set; + xmlNodeSetPtr node_set = NULL; xmlNodePtr node, cnode; xmlAttrPtr attr; @@ -189,7 +190,7 @@ int rccUiInit() { char *search[4]; rcc_option option; - const char *opt, *val; + const char *opt; rcc_option_name *option_name; const char *value_name; const char *class_name; @@ -551,6 +552,7 @@ int rccUiSetOptionNames(rcc_ui_context ctx, rcc_option_name *names) { int rccUiSetClassNames(rcc_ui_context ctx) { if (!ctx) return -1; ctx->class_names = 1; + return 0; } int rccUiRestoreLanguage(rcc_ui_context ctx) { diff --git a/ui/rccmenu.c b/ui/rccmenu.c index da04cbd..5a51c56 100644 --- a/ui/rccmenu.c +++ b/ui/rccmenu.c @@ -1,4 +1,5 @@ #include +#include #include #include "internal.h" diff --git a/ui/rccnames.c b/ui/rccnames.c index 933c910..1e79e5b 100644 --- a/ui/rccnames.c +++ b/ui/rccnames.c @@ -1,4 +1,5 @@ #include +#include #include @@ -62,7 +63,6 @@ typedef enum rcc_name_type_t { } rcc_name_type; rcc_name *rccUiGetRccName(rcc_ui_context ctx, const char *findname, unsigned char type) { - const char *res; unsigned int i,j; rcc_name *names[2], *nm; @@ -108,8 +108,6 @@ rcc_name *rccUiGetLanguageRccName(rcc_ui_context ctx, const char *lang) { } const char *rccUiGetLanguageName(rcc_ui_context ctx, const char *lang) { - const char *res; - unsigned int i,j; rcc_name *names; names = rccUiGetLanguageRccName(ctx, lang); @@ -123,8 +121,6 @@ rcc_name *rccUiGetCharsetRccName(rcc_ui_context ctx, const char *charset) { } const char *rccUiGetCharsetName(rcc_ui_context ctx, const char *charset) { - const char *res; - unsigned int i,j; rcc_name *names; names = rccUiGetCharsetRccName(ctx, charset); @@ -138,8 +134,6 @@ rcc_name *rccUiGetEngineRccName(rcc_ui_context ctx, const char *engine) { } const char *rccUiGetEngineName(rcc_ui_context ctx, const char *engine) { - const char *res; - unsigned int i,j; rcc_name *names; names = rccUiGetEngineRccName(ctx, engine); @@ -153,8 +147,6 @@ rcc_name *rccUiGetClassRccName(rcc_ui_context ctx, const char *cl) { } const char *rccUiGetClassName(rcc_ui_context ctx, const char *cl) { - const char *res; - unsigned int i,j; rcc_name *names; names = rccUiGetClassRccName(ctx, cl); @@ -185,7 +177,6 @@ rcc_option_name *rccUiGetOptionRccName(rcc_ui_context ctx, rcc_option option) { } const char *rccUiGetOptionName(rcc_ui_context ctx, rcc_option option) { - unsigned int i; rcc_option_name *name; name = rccUiGetOptionRccName(ctx, option); -- cgit v1.2.3