diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-06-28 23:44:19 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-06-28 23:44:19 +0000 |
commit | 081011f386915bd037a3569e46ed5e4f10c490da (patch) | |
tree | 6365a5bd41cf85b8eeb1db12740888da8f5926f8 /src | |
parent | c60519ab50b32dc282b385b3bbb2df319279f655 (diff) | |
download | librcc-081011f386915bd037a3569e46ed5e4f10c490da.tar.gz librcc-081011f386915bd037a3569e46ed5e4f10c490da.tar.bz2 librcc-081011f386915bd037a3569e46ed5e4f10c490da.tar.xz librcc-081011f386915bd037a3569e46ed5e4f10c490da.zip |
29.06.2005
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | src/librcc.c | 4 | ||||
-rw-r--r-- | src/lng.c | 2 | ||||
-rw-r--r-- | src/lngconfig.c | 2 | ||||
-rw-r--r-- | src/plugin.h | 7 | ||||
-rw-r--r-- | src/rccconfig.c (renamed from src/config.c) | 18 | ||||
-rw-r--r-- | src/rccconfig.h (renamed from src/config.h) | 0 | ||||
-rw-r--r-- | src/rccenca.c (renamed from src/enca.c) | 14 | ||||
-rw-r--r-- | src/rccenca.h (renamed from src/enca.h) | 15 | ||||
-rw-r--r-- | src/rcclocale.c | 2 | ||||
-rw-r--r-- | src/recode.c | 2 | ||||
-rw-r--r-- | src/xml.c | 2 |
12 files changed, 40 insertions, 36 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a0ad875..01a7da1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,9 +3,9 @@ librcc_la_SOURCES = librcc.c \ rcclocale.c rcclocale.h \ lng.c lng.h \ lngconfig.c lngconfig.h \ - config.c config.h \ + rccconfig.c rccconfig.h \ plugin.c plugin.h \ - enca.c enca.h \ + rccenca.c rccenca.h \ engine.c engine.h \ rccstring.c rccstring.h \ xml.c xml.h \ @@ -14,7 +14,7 @@ librcc_la_SOURCES = librcc.c \ internal.h include_HEADERS = librcc.h -INCLUDES = @XML_INCLUDES@ -librcc_la_LIBADD = @XML_LIBS@ +INCLUDES = @XML_INCLUDES@ @RCD_INCLUDES@ @ENCA_INCLUDES@ +librcc_la_LIBADD = @XML_LIBS@ @RCD_LIBS@ @ENCA_LIBS@ librcc_la_LDFLAGS = -version-info @LIBRCC_VERSION_INFO@ diff --git a/src/librcc.c b/src/librcc.c index e582c4c..56c357b 100644 --- a/src/librcc.c +++ b/src/librcc.c @@ -4,8 +4,8 @@ #include <librcd.h> #include "internal.h" -#include "config.h" -#include "enca.h" +#include "rccconfig.h" +#include "rccenca.h" int rccInit() { @@ -2,7 +2,7 @@ #include <string.h> #include "internal.h" -#include "config.h" +#include "rccconfig.h" #include "rcclocale.h" rcc_language_ptr rccGetLanguagePointer(rcc_context ctx, rcc_language_id language_id) { diff --git a/src/lngconfig.c b/src/lngconfig.c index 32f454b..b7c40c4 100644 --- a/src/lngconfig.c +++ b/src/lngconfig.c @@ -2,7 +2,7 @@ #include <string.h> #include "internal.h" -#include "config.h" +#include "rccconfig.h" #include "rcclocale.h" rcc_engine_ptr rccConfigGetEnginePointer(rcc_language_config config, rcc_engine_id engine_id) { diff --git a/src/plugin.h b/src/plugin.h index c6ed7b1..1325f03 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -1,10 +1,11 @@ #ifndef _RCC_PLUGIN_H #define _RCC_PLUGIN_H -#include "enca.h" +#include "../config.h" -#ifdef RCC_ENCA_DYNAMIC + +#ifdef HAVE_DLOPEN # define RCC_PLUGINS -#endif /* RCC_ENCA_DYNAMIC */ +#endif /* HAVE_DLOPEN */ typedef void *rcc_library_handle; diff --git a/src/config.c b/src/rccconfig.c index 89a8bde..7caabea 100644 --- a/src/config.c +++ b/src/rccconfig.c @@ -1,10 +1,11 @@ #include <stdio.h> #include <librcd.h> -#include "config.h" +#include "internal.h" +#include "rccconfig.h" -static rcc_charset_id rcc_autoengine_russian(rcc_engine_context ctx, char *buf, int len) { - return (int)get_russian_charset(buf,len); +static rcc_charset_id rcc_autoengine_russian(rcc_engine_context ctx, const char *buf, int len) { + return (rcc_charset_id)rcdGetRussianCharset(buf,len); } rcc_language_alias rcc_default_aliases[] = { @@ -93,14 +94,3 @@ rcc_language rcc_default_languages[] = { {NULL} }; -/* -const charset_list_t charset_list_default = { "Default", NULL }; -charset_t *charset_list=(charset_t*)charset_list_default; -#define autocharset_list_ni_default 1 -autocharset_list_t autocharset_list_default = { - {"Off", NULL, {NULL}} -}; - -int autocharset_list_ni=autocharset_list_ni_default; -autocharset_t *autocharset_list=(autocharset_t*)autocharset_list_default; -*/
\ No newline at end of file diff --git a/src/config.h b/src/rccconfig.h index ac74dbe..ac74dbe 100644 --- a/src/config.h +++ b/src/rccconfig.h diff --git a/src/enca.c b/src/rccenca.c index 0bb4470..d01e3d8 100644 --- a/src/enca.c +++ b/src/rccenca.c @@ -3,12 +3,16 @@ #include "internal.h" #include "plugin.h" #include "engine.h" -#include "config.h" +#include "rccconfig.h" -#include "enca.h" -#ifdef RCC_ENCA_DYNAMIC -# include "fake_enca.h" -#endif /* RCC_ENCA_DYNAMIC */ +#include "rccenca.h" +#ifdef RCC_ENCA_SUPPORT +# ifdef RCC_ENCA_DYNAMIC +# include "fake_enca.h" +# else +# include <enca.h> +# endif /* RCC_ENCA_DYNAMIC */ +#endif /* RCC_ENCA_SUPPORT */ static rcc_library_handle enca_handle = NULL; static rcc_engine *enca_engines = NULL; diff --git a/src/enca.h b/src/rccenca.h index 30662ec..2f2c487 100644 --- a/src/enca.h +++ b/src/rccenca.h @@ -1,14 +1,21 @@ #ifndef _RCC_ENCA_H #define _RCC_ENCA_H -#define RCC_ENCA_SUPPORT -#define RCC_ENCA_DYNAMIC -#define RCC_ENCA_LIB "libenca.so.0" +#include "../config.h" -#ifdef HPUX +#ifdef HAVE_ENCA +# define RCC_ENCA_SUPPORT +# undef RCC_ENCA_DYNAMIC +#elif HAVE_DLOPEN +# define RCC_ENCA_SUPPORT +# define RCC_ENCA_DYNAMIC +#else +# undef RCC_ENCA_SUPPORT # undef RCC_ENCA_DYNAMIC #endif +#define RCC_ENCA_LIB "libenca.so.0" + #ifdef RCC_ENCA_DYNAMIC # define RCC_ENCA_SUPPORT #endif diff --git a/src/rcclocale.c b/src/rcclocale.c index a16d51f..d2ff610 100644 --- a/src/rcclocale.c +++ b/src/rcclocale.c @@ -2,7 +2,7 @@ #include <string.h> #include <locale.h> -#include "config.h" +#include "rccconfig.h" static int rccLocaleGetClassByName(const char *locale) { if (!strcmp(locale, "LC_CTYPE")) return LC_CTYPE; diff --git a/src/recode.c b/src/recode.c index 0f6b865..be4d98c 100644 --- a/src/recode.c +++ b/src/recode.c @@ -9,7 +9,7 @@ #include "fs.h" #include "lng.h" #include "rccstring.h" -#include "config.h" +#include "rccconfig.h" static void rccIConvCopySymbol(char **in_buf, int *in_left, char **out_buf, int *out_left) { @@ -1,10 +1,12 @@ #include <stdio.h> #include "internal.h" +/* pass programm name */ int rccSave(rcc_context ctx) { return 0; } +/* Load and Then Save */ int rccLoad(rcc_context ctx) { return 0; } |