Commit 73794b70 authored by Aron Xu's avatar Aron Xu

Imported Upstream version 2.10.6

parents
* Mat <MatLinuxer2@gmail.com>
This diff is collapsed.
2009-02-26 Mat <MatLinuxer2@gmail.com>
* Revision to 2.10.5
* Enable autocomposing
2009-02-26 Mat <MatLinuxer2@gmail.com>
* Revision to 2.10.3 ( 2.2.3 + 0.8.0 )
* Log message to file .ucimf-log
2009-01-28 Mat <MatLinuxer2@gmail.com>
* Revision to 2.10.0 ( 2.2.0+0.8.0 )
* Add <Backspace> support
* ...and... Happy Chinese New Year :-D
2006-01-06 Mat <MatLinuxer2@gmail.com>
* Initial Revision 1.9.1
This diff is collapsed.
pkglib_LTLIBRARIES = openvanilla.la
pkglibdir=$(libdir)/ucimf/
openvanilla_la_SOURCES = openvanilla.cpp openvanilla.h debug.h
openvanilla_la_CPPFLAGS = -I/$(includedir) -I.
openvanilla_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,-E -Bsymbolic -lltdl
EXTRA_DIST= OpenVanilla/OVLibrary.h OpenVanilla/OVUtility.h OpenVanilla/OpenVanilla.h
This diff is collapsed.
What's new in ucimf-openvanilla version 1.9.1 ?
-------------------------------------------------
** 1.9.1 is a developement release
** Initial Release
// OVLibrary.h: Interface header for dynamic loadable OV modules
//
// Copyright (c) 2004-2007 The OpenVanilla Project (http://openvanilla.org)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of OpenVanilla nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef __OVLibrary_h
#define __OVLibrary_h
// as a dynamically-loadable library (be it .so, .DLL, .dylib or .bundle),
// we only need to export these three functions
// extern "C" unsigned int OVGetLibraryVersion();
// extern "C" int OVInitializeLibrary(OVService* srv, const char* libpath);
// extern "C" OVModule *OVGetModuleFromLibrary(int idx);
// wrapper macro for libraries that have exactly only one OVModule (IM/OF)
#define OV_SINGLE_MODULE_WRAPPER(classname) \
extern "C" unsigned int OVGetLibraryVersion() { return OV_VERSION; } \
extern "C" int OVInitializeLibrary(OVService*, const char*) { return 1; } \
extern "C" OVModule *OVGetModuleFromLibrary(int idx) {\
return (idx==0) ? new classname : NULL; \
}
// below are used for most OV Loader implementations, not needed by any
// loadable library
typedef unsigned int _OVGetLibraryVersion_t();
typedef int _OVInitializeLibrary_t(OVService *srv, const char *libpath);
typedef OVModule* _OVGetModuleFromLibrary_t(int);
struct OVLoadedLibrary {
OVLoadedLibrary(_OVInitializeLibrary_t *i, _OVGetModuleFromLibrary_t *m) :
initialize(i), getModule(m) {}
_OVInitializeLibrary_t *initialize;
_OVGetModuleFromLibrary_t *getModule;
};
#endif
// OVUtility.h: Inline utilities
//
// Copyright (c) 2004-2007 The OpenVanilla Project (http://openvanilla.org)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// 3. Neither the name of OpenVanilla nor the names of its contributors
// may be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef __OVUtility_h
#define __OVUtility_h
#include <ctime>
using namespace std;
class Watch
{
public:
void start()
{
tick_ = 0L;
sec_ = 0.0;
#ifdef OV_DEBUG
from_ = clock();
#else
from_ = 0L;
#endif
}
void stop()
{
#ifdef OV_DEBUG
tick_ = clock() - from_;
sec_ = static_cast<double>(tick_) / CLOCKS_PER_SEC;
#endif
}
clock_t getTick() { return tick_; }
double getSec() { return sec_; }
private:
clock_t from_;
clock_t tick_;
double sec_;
};
//<comment author='b6s'>
//The following three headers are for WIN32 specific debug log.
#if defined(WIN32) && defined(OV_DEBUG)
#include <windows.h>
#include <shlobj.h>
#include <io.h>
#endif
//</comment>
// debug routine
#ifdef OV_DEBUG
#include <stdarg.h>
#include <stdio.h>
// Thanks to modern C++ compiler, we can write this in the header file.
// No extra compiling/library making/linking is even needed!
inline static void murmur(const char* format,...) {
#ifdef WIN32
//@warning OV-specific paths here!
//<comment author='b6s'>
//The following codes of paths are redundant to AVConfig.cpp,
//however, they're necessary...
char OV_BASEDIR_PRE[MAX_PATH];
char OV_USERDIR_PRE[MAX_PATH];
//GetWindowsDirectoryA(OV_BASEDIR_PRE, MAX_PATH - 14);
//sprintf(OV_BASEDIR_PRE, "%s\\%s", OV_BASEDIR_PRE, "OpenVanilla\\");
strcpy(OV_BASEDIR_PRE, "C:\\OpenVanilla\\");
if (SHGetFolderPathA(
NULL,
CSIDL_APPDATA|CSIDL_FLAG_CREATE,
NULL,
0,
OV_USERDIR_PRE) >= 0) {
sprintf(OV_USERDIR_PRE, "%s\\%s", OV_USERDIR_PRE, "OpenVanilla\\");
if (_access (OV_USERDIR_PRE, 0))
CreateDirectoryA(OV_USERDIR_PRE, NULL);
} else
sprintf(OV_USERDIR_PRE, "%s\\%s", OV_BASEDIR_PRE, "User\\");
char OV_WIN32_DEBUG_LOG_PATH[MAX_PATH];
sprintf(OV_WIN32_DEBUG_LOG_PATH, "%s\\%s", OV_USERDIR_PRE, "orz.txt");
//</comment>
FILE *fp;
if (fp=fopen(OV_WIN32_DEBUG_LOG_PATH, "a")) {
va_list args;
va_start (args, format);
vfprintf (fp, format, args);
va_end (args);
fprintf (fp, "\n");
fclose(fp);
}
#else
va_list args;
va_start (args, format);
vfprintf (stderr, format, args);
va_end (args);
fprintf (stderr, "\n");
#endif
}
#else
inline static void murmur(const char* format,...) {}
#endif
#endif
This diff is collapsed.
Dear Users,
( for tarball source )
1. This extension has dependency on 'libucimf', please
remember to install it before compilation.
2. The package obey common tarball conventions, just
`./configure`
`make`
`make install`
and append customization parameters as `./configure --help` said.
Dear Developers,
( for online repository source )
0. Please execute following command to initialize autotools
for the first compilation
`autoreconf -i --force`
It will generate 'configure' and 'Makefile'
1. Compile
`OV_MODULEDIR=/lib/openvanilla ./configure `
`make`
"OV_MODULEDIR" can be customized to your modules' path.
2. Install
`make install`
This diff is collapsed.
This diff is collapsed.
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if the `closedir' function returns void instead of `int'. */
#undef CLOSEDIR_VOID
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `ltdl' library (-lltdl). */
#undef HAVE_LIBLTDL
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
/* Description */
#undef LIBDIR
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
#undef USE_DEBUG
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
This diff is collapsed.
This diff is collapsed.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(ucimf-openvanilla,2.10.6, ucimf@googlegroups.com)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([openvanilla.cpp])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lltdl':
AC_CHECK_LIB([ltdl], [main])
# Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_HEADERS([locale.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_HEADER_STDC
AC_CHECK_FUNCS([memset setlocale strstr])
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
LIBDIR="`eval echo $libdir`"
AC_DEFINE_UNQUOTED([LIBDIR], ["${LIBDIR}"], [Description])
AH_VERBATIM([USE_DEBUG],[#undef USE_DEBUG])
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],
[enable Debug (default: no)]),
debug=$enableval, debug="no")
if test "$debug" = yes; then
AC_DEFINE([USE_DEBUG], [], [])
fi
AM_CONDITIONAL(ENABLE_DEBUG, test "$debug" = "yes")
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#define UCIMF_ERR(format...) {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[Err]:"format );} }
#define UCIMF_WARNING(format...) {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[WARN]:"format );} }
#define UCIMF_INFO(format...) {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[INFO]:"format );} }
#define UCIMF_DEBUG(format...) {extern int LogFd; if( LogFd >=0 ){ dprintf( LogFd, "[DEBUG]:"format);} }
#define UrINFO(format...) UCIMF_INFO(format)
#define UrDEBUG(format...) UCIMF_DEBUG(format)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment