Index: programs/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Imakefile,v retrieving revision 1.12 diff -u -p -r1.12 Imakefile --- programs/Imakefile 18 Feb 2005 12:34:45 -0000 1.12 +++ programs/Imakefile 2 Mar 2005 16:39:55 -0000 @@ -140,7 +140,7 @@ SUBDIRS = \ $(SCREENSAVESRCDIR) editres $(FCDIRS) $(FCLANGDIR) fslsfonts fstobdf \ iceauth ico listres luit \ $(MAKEPSRESDIR) $(DPSCLIENTDIRS) $(DBECLIENTDIRS) \ - $(MKCFMSRCDIR) \ + $(MKCFMSRCDIR) mkcomposecache \ mkfontdir $(MKFONTSCALEDIR) oclock $(PROXYMGRSRCDIR) \ $(RGBSRCDIR) $(RSTARTSRCDIR) showfont \ $(SMPROXYSRCDIR) $(TWMSRCDIR) viewres x11perf xauth xbiff xcalc \ diff -urpN /var/tmp/bla/Imakefile programs/mkcomposecache/Imakefile --- /var/tmp/bla/Imakefile 1970-01-01 01:00:00.000000000 +0100 +++ programs/mkcomposecache/Imakefile 2005-02-23 20:36:44.000000000 +0100 @@ -0,0 +1,9 @@ +XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:53:48 cpqbld Exp $ + +SRCS = mkcomposecache.c +OBJS = mkcomposecache.o +DEP_LIBS = $(DEPXLIB) +LOCAL_LIBRARIES = $(XLIB) + +ComplexProgramTarget(mkcomposecache) +LinkBuildBinary(ProgramTargetName(mkcomposecache)) diff -urpN /var/tmp/bla/mkcomposecache.c programs/mkcomposecache/mkcomposecache.c --- /var/tmp/bla/mkcomposecache.c 1970-01-01 01:00:00.000000000 +0100 +++ programs/mkcomposecache/mkcomposecache.c 2005-03-02 16:27:22.347908095 +0100 @@ -0,0 +1,75 @@ +/* Copyright 2005 SUSE Products GmbH + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include +#include + +int main (int argc, char *argv[]) { + Display *disp; + XIM im; + char *src, *dest, *dispstr; + int len; + + if (argc != 4 && argc != 5) { + fprintf (stderr, "Usage: %s []\n", argv[0]); + exit (1); + } + + if (! setlocale (LC_ALL, argv[1])) { + perror ("setlocale()"); + return 1; + } + + src = malloc (strlen (argv[2]) + 14); + len = strlen (argv[3]) + 15; + if (argc == 5) + len += strlen (argv[4]) + 1; + dest = malloc (len); + if (! src || ! dest) { + perror ("malloc"); + exit (1); + } + sprintf (src, "XCOMPOSEFILE=%s", argv[2]); + if (argc == 4) + sprintf (dest, "XCOMPOSECACHE=%s", argv[3]); + else + sprintf (dest, "XCOMPOSECACHE=%s=%s", argv[3], argv[4]); + putenv (src); + putenv (dest); + + dispstr = getenv ("DISPLAY"); + if (! dispstr) + dispstr = ":0"; + + if (! (disp = XOpenDisplay (dispstr)) ) { + perror ("XOpenDisplay"); + exit (1); + } + XSetLocaleModifiers(""); + im = XOpenIM (disp, NULL, NULL, NULL); + + XCloseIM (im); + XCloseDisplay (disp); + + return 0; +} diff -urpN /var/tmp/bla/mkcomposecache.man programs/mkcomposecache/mkcomposecache.man --- /var/tmp/bla/mkcomposecache.man 1970-01-01 01:00:00.000000000 +0100 +++ programs/mkcomposecache/mkcomposecache.man 2005-03-02 17:38:07.636203739 +0100 @@ -0,0 +1,54 @@ +.\" $Xorg: mkfontdir.man,v 1.4 2001/02/09 02:05:33 xorgcvs Exp $ +.\" Copyright 2005 SUSE Products GmbH +.\" +.\" Permission to use, copy, modify, distribute, and sell this software and its +.\" documentation for any purpose is hereby granted without fee, provided that +.\" the above copyright notice appear in all copies and that both that +.\" copyright notice and this permission notice appear in supporting +.\" documentation. +.\" +.\" The above copyright notice and this permission notice shall be included +.\" in all copies or substantial portions of the Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +.\" OTHER DEALINGS IN THE SOFTWARE. +.\" +.TH MKCOMPOSECACHE 1 __xorgversion__ +.SH NAME +mkcomposecache \- create a cache file for a compose file explicitely +.SH SYNOPSIS +.B "mkcomposecache" +.I locale +.I compose-file +.I cache-dir +[ +.I internal-name +] +.SH DESCRIPTION +.I mkcomposecache +creates a cache file for the specified compose table and saves it in +.IR cache-dir . +If +.I internal-name +has been spezified, it is used as the name of the compose table for computing +the hash values and internal validation. This is necessary if global compose +cache files shall be created while using +.I DESTDIR +during X11 installation. Caches may depend on the used locale, UTF-8 based +locales are safe, though. + +.SH EXAMPLES +.B mkcomposecache +en_US.UTF-8 +/var/tmp/buildroot/usr/lib/X11/locale/en_US.UTF-8/Compose +/var/tmp/buildroot/var/X11R6/compose_cache +/usr/lib/X11/locale/en_US.UTF-8/Compose + +.SH FILES +.B /var/X11R6/compose_cache +Location of global compose cache.