diff -ruN --exclude=Makefile --exclude=makefile --exclude='*.org' ../xclip-0.08.org/Imakefile ./Imakefile --- ../xclip-0.08.org/Imakefile 2005-08-16 20:54:23.000000000 +0900 +++ ./Imakefile 2005-08-16 20:57:39.000000000 +0900 @@ -27,6 +27,7 @@ /* Normal development flags for warnings and debug info CFLAGS = -Wall -g */ +CFLAGS = -DI18N SRCS = xclib.c xcprint.c xclip.c OBJS = xclib.o xcprint.o xclip.o diff -ruN --exclude=Makefile --exclude=makefile --exclude='*.org' ../xclip-0.08.org/xclib.c ./xclib.c --- ../xclip-0.08.org/xclib.c 2005-08-16 20:54:24.000000000 +0900 +++ ./xclib.c 2005-08-16 18:41:09.000000000 +0900 @@ -23,6 +23,10 @@ #include #include #include +#ifndef I18N +#else +#include +#endif #include "xcdef.h" #include "xcprint.h" #include "xclib.h" @@ -128,7 +132,11 @@ XConvertSelection( dpy, sel, +#ifndef I18N XA_STRING, +#else + XA_TEXT(dpy), +#endif pty, win, CurrentTime @@ -377,7 +385,13 @@ /* put the data into an property */ if (evt.xselectionrequest.target == targets) { - Atom types[2] = { targets, XA_STRING }; + Atom types[2] = { targets, +#ifndef I18N + XA_STRING +#else + XA_TEXT(dpy) +#endif + }; /* send data all at once (not using INCR) */ XChangeProperty( @@ -425,7 +439,11 @@ dpy, *win, *pty, +#ifndef I18N XA_STRING, +#else + XA_TEXT(dpy), +#endif 8, PropModeReplace, (unsigned char*) txt, @@ -506,7 +524,11 @@ dpy, *win, *pty, +#ifndef I18N XA_STRING, +#else + XA_TEXT(dpy), +#endif 8, PropModeReplace, &txt[*pos], @@ -521,7 +543,11 @@ dpy, *win, *pty, +#ifndef I18N XA_STRING, +#else + XA_TEXT(dpy), +#endif 8, PropModeReplace, 0, diff -ruN --exclude=Makefile --exclude=makefile --exclude='*.org' ../xclip-0.08.org/xclip.c ./xclip.c --- ../xclip-0.08.org/xclip.c 2005-08-16 20:54:24.000000000 +0900 +++ ./xclip.c 2005-08-16 19:30:23.000000000 +0900 @@ -25,6 +25,11 @@ #include #include #include +#ifndef I18N +#else +#include +#include +#endif #include "xcdef.h" #include "xcprint.h" #include "xclib.h" @@ -491,6 +496,16 @@ /* Declare variables */ Window win; /* Window */ +#ifndef I18N +#else + if (!setlocale(LC_ALL, "")) + fprintf(stderr, "cannot setlocal(LC_ALL,\"\")\n"); + else if (!XSupportsLocale()) + fprintf(stderr, "does not support locale by XSupportsLocale()\n"); + else if (!XSetLocaleModifiers("")) + fprintf(stderr, "cannot XSetLocaleModifiers(\"\")\n"); +#endif + /* set up option table. I can't figure out a better way than this to * do it while sticking to pure ANSI C. The option and specifier * members have a type of volatile char *, so they need to be allocated