From 15c64e704b9f2ca9c6aa0de186d9f1e662a216ef Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 21 Nov 2003 21:50:59 +0000 Subject: [PATCH] Removed the ts_xlib files. --- dlls/x11drv/Makefile.in | 1 - dlls/x11drv/X11_calls | 22 ---- dlls/x11drv/desktop.c | 3 +- dlls/x11drv/scroll.c | 3 +- dlls/x11drv/ts_xlib.c | 160 ------------------------- dlls/x11drv/ts_xlib.h | 41 ------- dlls/x11drv/x11ddraw.c | 2 +- dlls/x11drv/x11drv_main.c | 2 +- dlls/x11drv/xrandr.c | 3 +- dlls/x11drv/xrender.c | 2 +- graphics/x11drv/bitblt.c | 6 +- graphics/x11drv/bitmap.c | 2 - graphics/x11drv/brush.c | 3 +- graphics/x11drv/clipping.c | 2 - graphics/x11drv/codepage.c | 2 - graphics/x11drv/dib.c | 2 +- graphics/x11drv/graphics.c | 7 +- graphics/x11drv/init.c | 2 - graphics/x11drv/opengl.c | 2 - graphics/x11drv/palette.c | 2 - graphics/x11drv/text.c | 4 - tools/make_X11wrappers | 235 ------------------------------------- 22 files changed, 11 insertions(+), 497 deletions(-) delete mode 100644 dlls/x11drv/X11_calls delete mode 100644 dlls/x11drv/ts_xlib.c delete mode 100644 dlls/x11drv/ts_xlib.h delete mode 100755 tools/make_X11wrappers diff --git a/dlls/x11drv/Makefile.in b/dlls/x11drv/Makefile.in index 481b00b780d..53c247f8763 100644 --- a/dlls/x11drv/Makefile.in +++ b/dlls/x11drv/Makefile.in @@ -30,7 +30,6 @@ C_SRCS = \ mouse.c \ scroll.c \ settings.c \ - ts_xlib.c \ window.c \ winpos.c \ x11ddraw.c \ diff --git a/dlls/x11drv/X11_calls b/dlls/x11drv/X11_calls deleted file mode 100644 index 3501e483763..00000000000 --- a/dlls/x11drv/X11_calls +++ /dev/null @@ -1,22 +0,0 @@ -# This file contains the list of X11 calls that Wine uses and which must be -# protected by a critical section for multi-threaded use. -# -# To add a new call, put it on this list and run tools/make_X11wrappers. -# Also read the comments at the top of tools/make_X11wrappers. -# -XChangeProperty -XFree -XFreeFont -XGetAtomName -XGetFontProperty -XGetSelectionOwner -XGetWindowProperty -XKeycodeToKeysym -XKeysymToKeycode -XKeysymToString -XMapWindow -XQueryPointer -XQueryTree -XSetSelectionOwner -XSync -XUnmapWindow diff --git a/dlls/x11drv/desktop.c b/dlls/x11drv/desktop.c index 1809cdca0a5..be39dfd5d2e 100644 --- a/dlls/x11drv/desktop.c +++ b/dlls/x11drv/desktop.c @@ -20,8 +20,7 @@ #include "config.h" #include - -#include "ts_xlib.h" +#include #include "wine/winuser16.h" #include "win.h" diff --git a/dlls/x11drv/scroll.c b/dlls/x11drv/scroll.c index c190c1752ec..6d826e819d8 100644 --- a/dlls/x11drv/scroll.c +++ b/dlls/x11drv/scroll.c @@ -23,8 +23,7 @@ #include "config.h" #include - -#include "ts_xlib.h" +#include #include "windef.h" #include "winbase.h" diff --git a/dlls/x11drv/ts_xlib.c b/dlls/x11drv/ts_xlib.c deleted file mode 100644 index fc1270fd9e2..00000000000 --- a/dlls/x11drv/ts_xlib.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Thread safe wrappers around Xlib calls. - * This file was generated automatically by tools/make_X11wrappers - * DO NOT EDIT! - */ - -#include "config.h" - -#ifdef HAVE_X11_XLIB_H - -#include - -#include "ts_xlib.h" - - -char * TSXGetAtomName(Display* a0, Atom a1) -{ - char * r; - wine_tsx11_lock(); - r = XGetAtomName(a0, a1); - wine_tsx11_unlock(); - return r; -} - -char * TSXKeysymToString(KeySym a0) -{ - char * r; - wine_tsx11_lock(); - r = XKeysymToString(a0); - wine_tsx11_unlock(); - return r; -} - -Window TSXGetSelectionOwner(Display* a0, Atom a1) -{ - Window r; - wine_tsx11_lock(); - r = XGetSelectionOwner(a0, a1); - wine_tsx11_unlock(); - return r; -} - -KeySym TSXKeycodeToKeysym(Display* a0, unsigned int a1, int a2) -{ - KeySym r; - wine_tsx11_lock(); - r = XKeycodeToKeysym(a0, a1, a2); - wine_tsx11_unlock(); - return r; -} - -int TSXChangeProperty(Display* a0, Window a1, Atom a2, Atom a3, int a4, int a5, const unsigned char* a6, int a7) -{ - int r; - wine_tsx11_lock(); - r = XChangeProperty(a0, a1, a2, a3, a4, a5, a6, a7); - wine_tsx11_unlock(); - return r; -} - -int TSXFree(void* a0) -{ - int r; - wine_tsx11_lock(); - r = XFree(a0); - wine_tsx11_unlock(); - return r; -} - -int TSXFreeFont(Display* a0, XFontStruct* a1) -{ - int r; - wine_tsx11_lock(); - r = XFreeFont(a0, a1); - wine_tsx11_unlock(); - return r; -} - -int TSXGetFontProperty(XFontStruct* a0, Atom a1, unsigned long* a2) -{ - int r; - wine_tsx11_lock(); - r = XGetFontProperty(a0, a1, a2); - wine_tsx11_unlock(); - return r; -} - -int TSXGetWindowProperty(Display* a0, Window a1, Atom a2, long a3, long a4, int a5, Atom a6, Atom* a7, int* a8, unsigned long* a9, unsigned long* a10, unsigned char** a11) -{ - int r; - wine_tsx11_lock(); - r = XGetWindowProperty(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - wine_tsx11_unlock(); - return r; -} - -KeyCode TSXKeysymToKeycode(Display* a0, KeySym a1) -{ - KeyCode r; - wine_tsx11_lock(); - r = XKeysymToKeycode(a0, a1); - wine_tsx11_unlock(); - return r; -} - -int TSXMapWindow(Display* a0, Window a1) -{ - int r; - wine_tsx11_lock(); - r = XMapWindow(a0, a1); - wine_tsx11_unlock(); - return r; -} - -int TSXQueryPointer(Display* a0, Window a1, Window* a2, Window* a3, int* a4, int* a5, int* a6, int* a7, unsigned int* a8) -{ - int r; - wine_tsx11_lock(); - r = XQueryPointer(a0, a1, a2, a3, a4, a5, a6, a7, a8); - wine_tsx11_unlock(); - return r; -} - -int TSXQueryTree(Display* a0, Window a1, Window* a2, Window* a3, Window** a4, unsigned int* a5) -{ - int r; - wine_tsx11_lock(); - r = XQueryTree(a0, a1, a2, a3, a4, a5); - wine_tsx11_unlock(); - return r; -} - -int TSXSetSelectionOwner(Display* a0, Atom a1, Window a2, Time a3) -{ - int r; - wine_tsx11_lock(); - r = XSetSelectionOwner(a0, a1, a2, a3); - wine_tsx11_unlock(); - return r; -} - -int TSXSync(Display* a0, int a1) -{ - int r; - wine_tsx11_lock(); - r = XSync(a0, a1); - wine_tsx11_unlock(); - return r; -} - -int TSXUnmapWindow(Display* a0, Window a1) -{ - int r; - wine_tsx11_lock(); - r = XUnmapWindow(a0, a1); - wine_tsx11_unlock(); - return r; -} - -#endif /* defined(HAVE_X11_XLIB_H) */ diff --git a/dlls/x11drv/ts_xlib.h b/dlls/x11drv/ts_xlib.h deleted file mode 100644 index 6fefde583b9..00000000000 --- a/dlls/x11drv/ts_xlib.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Thread safe wrappers around Xlib calls. - * Always include this file instead of . - * This file was generated automatically by tools/make_X11wrappers - * DO NOT EDIT! - */ - -#ifndef __WINE_TS_XLIB_H -#define __WINE_TS_XLIB_H - -#ifndef __WINE_CONFIG_H -# error You must include config.h to use this header -#endif - -#ifdef HAVE_X11_XLIB_H - -#include - -extern void wine_tsx11_lock(void); -extern void wine_tsx11_unlock(void); - -extern char * TSXGetAtomName(Display*, Atom); -extern char * TSXKeysymToString(KeySym); -extern Window TSXGetSelectionOwner(Display*, Atom); -extern KeySym TSXKeycodeToKeysym(Display*, unsigned int, int); -extern int TSXChangeProperty(Display*, Window, Atom, Atom, int, int, const unsigned char*, int); -extern int TSXFree(void*); -extern int TSXFreeFont(Display*, XFontStruct*); -extern int TSXGetFontProperty(XFontStruct*, Atom, unsigned long*); -extern int TSXGetWindowProperty(Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**); -extern KeyCode TSXKeysymToKeycode(Display*, KeySym); -extern int TSXMapWindow(Display*, Window); -extern int TSXQueryPointer(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*); -extern int TSXQueryTree(Display*, Window, Window*, Window*, Window**, unsigned int*); -extern int TSXSetSelectionOwner(Display*, Atom, Window, Time); -extern int TSXSync(Display*, int); -extern int TSXUnmapWindow(Display*, Window); - -#endif /* defined(HAVE_X11_XLIB_H) */ - -#endif /* __WINE_TS_XLIB_H */ diff --git a/dlls/x11drv/x11ddraw.c b/dlls/x11drv/x11ddraw.c index b1818c0d418..914973fc32a 100644 --- a/dlls/x11drv/x11ddraw.c +++ b/dlls/x11drv/x11ddraw.c @@ -21,10 +21,10 @@ #include "config.h" #include +#include #define NONAMELESSUNION #define NONAMELESSSTRUCT -#include "ts_xlib.h" #include "x11drv.h" #include "x11ddraw.h" #include "xvidmode.h" diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index 77baba1786a..38298479cd7 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -33,7 +33,7 @@ # include #endif #include -#include "ts_xlib.h" +#include #ifdef HAVE_XKB #include #endif diff --git a/dlls/x11drv/xrandr.c b/dlls/x11drv/xrandr.c index 00460d946b1..c75d6f0c0e9 100644 --- a/dlls/x11drv/xrandr.c +++ b/dlls/x11drv/xrandr.c @@ -24,8 +24,7 @@ #ifdef HAVE_LIBXRANDR -#include "ts_xlib.h" - +#include #include #include "x11drv.h" diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c index 9705e564040..423c87ecc87 100644 --- a/dlls/x11drv/xrender.c +++ b/dlls/x11drv/xrender.c @@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(xrender); #ifdef HAVE_X11_EXTENSIONS_XRENDER_H -#include "ts_xlib.h" +#include #include static XRenderPictFormat *screen_format; /* format of screen */ diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c index e94e71f5fd1..1ded2b7cedf 100644 --- a/graphics/x11drv/bitblt.c +++ b/graphics/x11drv/bitblt.c @@ -20,14 +20,12 @@ #include "config.h" -#include - -#include "ts_xlib.h" - #include #include #include #include +#include + #include "windef.h" #include "winbase.h" #include "wingdi.h" diff --git a/graphics/x11drv/bitmap.c b/graphics/x11drv/bitmap.c index 6ce536273fe..f5d664834a9 100644 --- a/graphics/x11drv/bitmap.c +++ b/graphics/x11drv/bitmap.c @@ -21,8 +21,6 @@ #include "config.h" -#include "ts_xlib.h" - #include #include #include "gdi.h" diff --git a/graphics/x11drv/brush.c b/graphics/x11drv/brush.c index f8ef09d5eec..ba1fd992803 100644 --- a/graphics/x11drv/brush.c +++ b/graphics/x11drv/brush.c @@ -20,9 +20,8 @@ #include "config.h" -#include "ts_xlib.h" - #include + #include "bitmap.h" #include "x11drv.h" #include "wine/debug.h" diff --git a/graphics/x11drv/clipping.c b/graphics/x11drv/clipping.c index 8394c1185f1..1c664c09126 100644 --- a/graphics/x11drv/clipping.c +++ b/graphics/x11drv/clipping.c @@ -20,8 +20,6 @@ #include "config.h" -#include "ts_xlib.h" - #include #include "gdi.h" diff --git a/graphics/x11drv/codepage.c b/graphics/x11drv/codepage.c index 90139f8463e..4b65528fad7 100644 --- a/graphics/x11drv/codepage.c +++ b/graphics/x11drv/codepage.c @@ -20,8 +20,6 @@ #include "config.h" -#include "ts_xlib.h" - #include #include diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 5bcf7e81993..b70ee3730af 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -20,7 +20,7 @@ #include "config.h" -#include "ts_xlib.h" +#include #ifdef HAVE_LIBXXSHM #include # ifdef HAVE_SYS_SHM_H diff --git a/graphics/x11drv/graphics.c b/graphics/x11drv/graphics.c index 24c9c448f10..8aaef6e3bcf 100644 --- a/graphics/x11drv/graphics.c +++ b/graphics/x11drv/graphics.c @@ -25,12 +25,6 @@ #include "config.h" -#include - -#include "ts_xlib.h" -#include -#include - #include #ifdef HAVE_FLOAT_H # include @@ -40,6 +34,7 @@ #define PI M_PI #endif #include +#include #include "x11drv.h" #include "x11font.h" diff --git a/graphics/x11drv/init.c b/graphics/x11drv/init.c index 0b1816f4cd3..9bdac3d7d56 100644 --- a/graphics/x11drv/init.c +++ b/graphics/x11drv/init.c @@ -20,8 +20,6 @@ #include "config.h" -#include "ts_xlib.h" - #include #include diff --git a/graphics/x11drv/opengl.c b/graphics/x11drv/opengl.c index 1f54765f67c..95bd76fc167 100644 --- a/graphics/x11drv/opengl.c +++ b/graphics/x11drv/opengl.c @@ -21,8 +21,6 @@ #include "config.h" #include "wine/port.h" -#include "ts_xlib.h" - #include #include diff --git a/graphics/x11drv/palette.c b/graphics/x11drv/palette.c index d5115fbe8cb..ec313b35038 100644 --- a/graphics/x11drv/palette.c +++ b/graphics/x11drv/palette.c @@ -20,8 +20,6 @@ #include "config.h" -#include "ts_xlib.h" - #include #include diff --git a/graphics/x11drv/text.c b/graphics/x11drv/text.c index f1b930785cb..7083065b478 100644 --- a/graphics/x11drv/text.c +++ b/graphics/x11drv/text.c @@ -20,10 +20,6 @@ #include "config.h" -#include - -#include "ts_xlib.h" - #include #include #include diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers deleted file mode 100755 index 8c6691b88d6..00000000000 --- a/tools/make_X11wrappers +++ /dev/null @@ -1,235 +0,0 @@ -#!/usr/bin/perl -w - -# Create threads safe wrappers around X11 calls. -# -# Copyright 1998 Kristian Nielsen. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# FIXME: This does not do full C prototype parsing, but relies on -# knowledge on how the X11 include files are formatted. It will -# probably need to be modified for new include files. It also fails -# for certain prototypes (notably those with function pointer -# arguments or results), so these must be added manually. And it -# relies on a fixed location of X11 includes (/usr/X11R6/include/). -# -# This program expects to be run from Wine's main directory. - -$X11_include_dir = "/usr/X11/include"; -$outdir = "dlls/x11drv"; -$wantfile = "$outdir/X11_calls"; -@dolist = ("Xlib"); - -# First read list of wanted function names. - -open(WANT, $wantfile) || die "open"; -while() { - next if /^\s*\#/; # Skip comment lines. - next if /^\s*$/; # Skip empty lines. - if(/^\s*([a-zA-Z0-9_]+)\s*$/) { - $want{$1} = 1; - } else { - die "syntax error in file '$wantfile', in line '$_'"; - } -} -close(WANT); - -foreach $name (@dolist) { - - $ucname = uc $name; - $lcname = lc $name; - - $outfile = "/ts_$lcname"; - open(OUTC, ">$outdir/$outfile.c") || die "open"; - open(OUTH, ">$outdir/$outfile.h") || die "open"; - - $x11_incl = ""; - $extensions_dir = ""; - $pre_file = "#ifdef HAVE_X11_XLIB_H\n"; - $post_file = "#endif /* defined(HAVE_X11_XLIB_H) */\n"; - $inc_name = $name; - - print OUTH <. - * This file was generated automatically by tools/make_X11wrappers - * DO NOT EDIT! - */ - -#ifndef __WINE_TS_$ucname\_H -#define __WINE_TS_$ucname\_H - -#ifndef __WINE_CONFIG_H -# error You must include config.h to use this header -#endif - -$pre_file -$x11_incl#include - -extern void wine_tsx11_lock(void); -extern void wine_tsx11_unlock(void); - -END - - print OUTC < - -#include "ts_$lcname.h" - -END - - open(IN, - "echo \"$x11_incl#include \" | " . - "gcc -L$X11_include_dir -DNeedFunctionPrototypes -E - | " . - "grep -v '^[ \t]*\$)' |" - ) || die "open"; - - PROTO: while() { - if(m'extern\s+([^()]*)\b([a-zA-Z0-9_]+)\s*\(') { - $result_type = $1; - $fn_name = $2; - $result_type = "int" if $result_type =~ /^\s*$/; - @args = (); - while() { - last if m'\)\s*;'; - # Give up on vararg functions and function pointer args. - if(m'\.\.\.|\(\*\)') { - undef $fn_name; - last; - } - if(m'\s*([^,]*[^, \t])\s*(,?\n)') { - $args[$#args+1] = $1; - if ($1 =~ /char\s*\[/) { # small hack for XQueryKeymap - $args[$#args] = "char*"; - } - } - } - # Skip if vararg, function pointer arg, or not needed. - next unless $fn_name; - next unless $want{$fn_name} && $want{$fn_name} == 1; - - # Special case for no arguments (which is specified as "void"). - if($#args == 0 && $args[0] eq "void") { - @args = (); - } - $proto = ""; - $formals = ""; - $actuals = ""; - for($i = 0; $i <= $#args; $i++) { - $comma = $i < $#args ? ", " : ""; - $proto .= "$args[$i]$comma"; - $formals .= "$args[$i] a$i$comma"; - $actuals .= "a$i$comma"; - } - $proto = $formals = "void" if $#args == -1; - output_fn($fn_name, $result_type, $proto, $formals, $actuals); - } - } - - print OUTH <