diff --git a/configure b/configure index 4a99b1e8f42..4316a478c04 100755 --- a/configure +++ b/configure @@ -1789,7 +1789,6 @@ enable_fonts enable_include enable_port enable_wine -enable_wpp enable_loader enable_nls enable_po @@ -21101,7 +21100,6 @@ wine_fn_config_makefile fonts enable_fonts wine_fn_config_makefile include enable_include wine_fn_config_makefile libs/port enable_port wine_fn_config_makefile libs/wine enable_wine -wine_fn_config_makefile libs/wpp enable_wpp wine_fn_config_makefile loader enable_loader wine_fn_config_makefile nls enable_nls wine_fn_config_makefile po enable_po diff --git a/configure.ac b/configure.ac index 56ef99f2d4c..c0a126293c4 100644 --- a/configure.ac +++ b/configure.ac @@ -3871,7 +3871,6 @@ WINE_CONFIG_MAKEFILE(fonts) WINE_CONFIG_MAKEFILE(include) WINE_CONFIG_MAKEFILE(libs/port) WINE_CONFIG_MAKEFILE(libs/wine) -WINE_CONFIG_MAKEFILE(libs/wpp) WINE_CONFIG_MAKEFILE(loader) WINE_CONFIG_MAKEFILE(nls) WINE_CONFIG_MAKEFILE(po) diff --git a/include/wine/wpp.h b/include/wine/wpp.h deleted file mode 100644 index 4994577d586..00000000000 --- a/include/wine/wpp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Exported functions of the Wine preprocessor - * - * Copyright 2002 Alexandre Julliard - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __WINE_WPP_H -#define __WINE_WPP_H - -#include -#include - -extern void wpp_del_define( const char *name ); -extern void wpp_add_cmdline_define( const char *value ); -extern void wpp_set_debug( int lex_debug, int parser_debug, int msg_debug ); -extern void wpp_set_pedantic( int on ); -extern void wpp_add_include_path( const char *path ); -extern char *wpp_find_include( const char *name, const char *parent_name ); -/* Return value == 0 means successful execution */ -extern int wpp_parse( const char *input, FILE *output ); - -#endif /* __WINE_WPP_H */ diff --git a/libs/wpp/Makefile.in b/libs/wpp/Makefile.in deleted file mode 100644 index 982d34b15bd..00000000000 --- a/libs/wpp/Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -STATICLIB = libwpp.a - -C_SRCS = wpp.c - -LEX_SRCS = ppl.l -BISON_SRCS = ppy.y diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in index a231087f37c..7eb74b813a4 100644 --- a/tools/widl/Makefile.in +++ b/tools/widl/Makefile.in @@ -1,5 +1,5 @@ PROGRAMS = widl -MANPAGES = widl.man.in +PARENTSRC = ../wrc C_SRCS = \ client.c \ @@ -14,15 +14,21 @@ C_SRCS = \ typetree.c \ utils.c \ widl.c \ + wpp.c \ write_msft.c -LEX_SRCS = parser.l -BISON_SRCS = parser.y +LEX_SRCS = \ + parser.l \ + ppl.l + +BISON_SRCS = \ + parser.y \ + ppy.y + +MANPAGES = widl.man.in widl_EXTRADEFS = \ -DINCLUDEDIR="\"${includedir}\"" \ -DBIN_TO_INCLUDEDIR=\"`${MAKEDEP} -R ${bindir} ${includedir}`\" -EXTRALIBS = -lwpp - INSTALL_DEV = $(PROGRAMS) diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 4d3b9d683e8..72a7a432bbc 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -62,7 +62,7 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)* #include "widl.h" #include "utils.h" #include "parser.h" -#include "wine/wpp.h" +#include "wpp_private.h" #include "parser.tab.h" diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c index 8b2a2401367..d5b1a3903ca 100644 --- a/tools/widl/typelib.c +++ b/tools/widl/typelib.c @@ -21,7 +21,6 @@ #include "config.h" #include "wine/port.h" -#include "wine/wpp.h" #include #include @@ -37,6 +36,7 @@ #include "widl.h" #include "utils.h" +#include "wpp_private.h" #include "parser.h" #include "header.h" #include "typelib.h" diff --git a/tools/widl/widl.c b/tools/widl/widl.c index b40745a49f8..5b1ce6ca689 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -40,7 +40,7 @@ #include "widl.h" #include "utils.h" #include "parser.h" -#include "wine/wpp.h" +#include "wpp_private.h" #include "header.h" static const char usage[] = diff --git a/tools/wrc/Makefile.in b/tools/wrc/Makefile.in index fb6eba20c27..140240962e4 100644 --- a/tools/wrc/Makefile.in +++ b/tools/wrc/Makefile.in @@ -1,5 +1,5 @@ PROGRAMS = wrc -MANPAGES = wrc.man.in +EXTRALIBS = $(GETTEXTPO_LIBS) C_SRCS = \ dumpres.c \ @@ -8,11 +8,19 @@ C_SRCS = \ po.c \ translation.c \ utils.c \ + wpp.c \ wrc.c \ writeres.c -LEX_SRCS = parser.l -BISON_SRCS = parser.y +LEX_SRCS = \ + parser.l \ + ppl.l + +BISON_SRCS = \ + parser.y \ + ppy.y + +MANPAGES = wrc.man.in wrc_EXTRADEFS = \ -DNLSDIR="\"${nlsdir}\"" \ @@ -20,6 +28,4 @@ wrc_EXTRADEFS = \ -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" \ -DBIN_TO_INCLUDEDIR=\"`${MAKEDEP} -R ${bindir} ${includedir}`\" -EXTRALIBS = $(GETTEXTPO_LIBS) -lwpp - INSTALL_DEV = $(PROGRAMS) diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y index f5666a03994..19717a324e1 100644 --- a/tools/wrc/parser.y +++ b/tools/wrc/parser.y @@ -134,7 +134,7 @@ #include "utils.h" #include "newstruc.h" #include "dumpres.h" -#include "wine/wpp.h" +#include "wpp_private.h" #include "parser.h" #include "windef.h" #include "winbase.h" diff --git a/libs/wpp/ppl.l b/tools/wrc/ppl.l similarity index 98% rename from libs/wpp/ppl.l rename to tools/wrc/ppl.l index c1b83076b40..786ec3b170a 100644 --- a/libs/wpp/ppl.l +++ b/tools/wrc/ppl.l @@ -17,16 +17,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * - * History: - * 24-Apr-2000 BS - Started from scratch to restructure everything - * and reintegrate the source into the wine-tree. - * 04-Jan-2000 BS - Added comments about the lexicographical - * grammar to give some insight in the complexity. - * 28-Dec-1999 BS - Eliminated backing-up of the flexer by running - * `flex -b' on the source. This results in some - * weirdo extra rules, but a much faster scanner. - * 23-Dec-1999 BS - Started this file - * *------------------------------------------------------------------------- * The preprocessor's lexographical grammar (approximately): * @@ -182,7 +172,6 @@ ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL] #define YY_NO_UNISTD_H #endif -#include "wine/wpp.h" #include "wpp_private.h" #include "ppy.tab.h" diff --git a/libs/wpp/ppy.y b/tools/wrc/ppy.y similarity index 98% rename from libs/wpp/ppy.y rename to tools/wrc/ppy.y index 0afc642d3e0..f8c701e28c8 100644 --- a/libs/wpp/ppy.y +++ b/tools/wrc/ppy.y @@ -3,7 +3,6 @@ * * Copyright 1999-2000 Bertho A. Stultiens (BS) * - * * 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 @@ -18,13 +17,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * - * History: - * 24-Apr-2000 BS Restructured the lot to fit the new scanner - * and reintegrate into the wine-tree. - * 01-Jan-2000 BS FIXME: win16 preprocessor calculates with - * 16 bit ints and overflows...? - * 26-Dec-1999 BS Started this file - * */ %{ diff --git a/libs/wpp/wpp.c b/tools/wrc/wpp.c similarity index 99% rename from libs/wpp/wpp.c rename to tools/wrc/wpp.c index 0e26121330c..1715c2e262d 100644 --- a/libs/wpp/wpp.c +++ b/tools/wrc/wpp.c @@ -35,7 +35,6 @@ #endif #include "wpp_private.h" -#include "wine/wpp.h" struct pp_status pp_status; diff --git a/libs/wpp/wpp_private.h b/tools/wrc/wpp_private.h similarity index 92% rename from libs/wpp/wpp_private.h rename to tools/wrc/wpp_private.h index fbcd3c00da7..503bd93d8c9 100644 --- a/libs/wpp/wpp_private.h +++ b/tools/wrc/wpp_private.h @@ -24,6 +24,15 @@ #include #include "wine/list.h" +extern void wpp_del_define( const char *name ); +extern void wpp_add_cmdline_define( const char *value ); +extern void wpp_set_debug( int lex_debug, int parser_debug, int msg_debug ); +extern void wpp_set_pedantic( int on ); +extern void wpp_add_include_path( const char *path ); +extern char *wpp_find_include( const char *name, const char *parent_name ); +/* Return value == 0 means successful execution */ +extern int wpp_parse( const char *input, FILE *output ); + struct pp_entry; /* forward */ /* * Include logic diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c index c95819a793e..757a3915e7a 100644 --- a/tools/wrc/wrc.c +++ b/tools/wrc/wrc.c @@ -41,7 +41,7 @@ #include "genres.h" #include "newstruc.h" #include "parser.h" -#include "wine/wpp.h" +#include "wpp_private.h" #ifdef WORDS_BIGENDIAN #define ENDIAN "big"