diff --git a/programs/clock/.cvsignore b/programs/clock/.cvsignore index ee7a55a7c60..20cab03278c 100644 --- a/programs/clock/.cvsignore +++ b/programs/clock/.cvsignore @@ -9,3 +9,4 @@ Pt.s Sw.s Wa.s clock +rsrc.s diff --git a/programs/clock/Makefile.in b/programs/clock/Makefile.in index f61757592fe..c14d4ba77e3 100644 --- a/programs/clock/Makefile.in +++ b/programs/clock/Makefile.in @@ -6,28 +6,18 @@ VPATH = @srcdir@ MODULE = none PROGRAMS = clock ALL_LIBS = $(WINELIB) $(X_LIBS) $(XLIB) $(LIBS) -RCFLAGS = -w32 -h -WRCEXTRA = -t -A -p $* +WRCEXTRA = -t -A -p clock -LANGUAGES = En Da De Fr Sw Es Fi Wa Pt LICENSELANG = En -MOSTSRCS = \ +C_SRCS = \ language.c \ license.c \ winclock.c \ - main.c - -# Some strings need addresses >= 0x10000 -STRINGSRCS = \ + main.c \ $(LICENSELANG:%=License_%.c) -RC_SRCS = $(LANGUAGES:%=%.rc) - -C_SRCS = $(MOSTSRCS) $(STRINGSRCS) - -MOSTOBJS = $(MOSTSRCS:.c=.o) -STRINGOBJS = $(STRINGSRCS:.c=.o) $(RC_SRCS:.rc=.o) +RC_SRCS = rsrc.rc all: check_wrc $(PROGRAMS) @@ -39,21 +29,14 @@ depend:: .rc.s: $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -o $*.s -.rc.h: - $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -nH $*.h +clock: $(OBJS) $(WINESTUB) + $(CC) -o clock $(OBJS) $(LDOPTIONS) $(ALL_LIBS) -clock: $(MOSTOBJS) $(STRINGOBJS) $(WINESTUB) - $(CC) -o clock $(MOSTOBJS) $(LDOPTIONS) $(ALL_LIBS) $(STRINGOBJS) - -install: dummy +install:: dummy $(INSTALL_PROGRAM) clock $(bindir)/clock -uninstall: dummy +uninstall:: dummy $(RM) $(bindir)/clock -$(RC_SRCS:.rc=.s): $(WRC) - -dummy: - ### Dependencies: diff --git a/programs/clock/clock.rc b/programs/clock/clock.rc index f4169c3c650..cd1198af283 100644 --- a/programs/clock/clock.rc +++ b/programs/clock/clock.rc @@ -4,11 +4,6 @@ * Copyright 1998 Marcel Baur */ -#include "windows.h" -#include "main.h" - -#define CONCAT(a, b) CONCAT1(a, b) -#define CONCAT1(a, b) a##b /* Main Menu */ @@ -41,13 +36,6 @@ CONCAT(MENU_, LANGUAGE_ID) MENU /* Strings */ -#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str -#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) -#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids - -#define STRINGIFY(str) STRINGIFY1(str) -#define STRINGIFY1(str) #str - #define STRING_LANGUAGE_ID STRINGIFY(LANGUAGE_ID) #define STRING_LANGUAGE_MENU_ITEM LANGUAGE_MENU_ITEM #define STRING_MENU_ON_TOP MENU_ON_TOP @@ -60,3 +48,34 @@ ADDSTRING(LANGUAGE_MENU_ITEM) ADDSTRING(CLOCK) ADDSTRING(MENU_ON_TOP) } + + +/* Undefine all language-specific strings */ + +#undef LANGUAGE_ID +#undef LANGUAGE_NUMBER + +#undef MENU_ON_TOP + +#undef MENU_PROPERTIES +#undef MENU_ANALOG +#undef MENU_DIGITAL +#undef MENU_FONT +#undef MENU_WITHOUT_TITLE + +#undef MENU_SECONDS +#undef MENU_DATE + +#undef MENU_LANGUAGE +#undef LANGUAGE_MENU_ITEM + +#undef MENU_INFO +#undef MENU_INFO_LICENSE +#undef MENU_INFO_NO_WARRANTY +#undef MENU_INFO_ABOUT_WINE + +#undef STRING_LANGUAGE_ID +#undef STRING_LANGUAGE_MENU_ITEM +#undef STRING_MENU_ON_TOP +#undef STRING_CLOCK + diff --git a/programs/clock/main.c b/programs/clock/main.c index 9ddd49fb883..cfe8a314e8b 100644 --- a/programs/clock/main.c +++ b/programs/clock/main.c @@ -18,19 +18,6 @@ #include "winclock.h" #include "commdlg.h" -#ifdef WINELIB - #include "options.h" - #include "resource.h" - #include "shell.h" - void LIBWINE_Register_Da(); - void LIBWINE_Register_De(); - void LIBWINE_Register_En(); - void LIBWINE_Register_Es(); - void LIBWINE_Register_Fr(); - void LIBWINE_Register_Sw(); - void LIBWINE_Register_Fi(); -#endif - CLOCK_GLOBALS Globals; /*********************************************************************** @@ -210,17 +197,6 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) char szClassName[] = "CLClass"; /* To make sure className >= 0x10000 */ char szWinName[] = "Clock"; - #if defined(WINELIB) && !defined(HAVE_WINE_CONSTRUCTOR) - /* Register resources */ - LIBWINE_Register_Da(); - LIBWINE_Register_De(); - LIBWINE_Register_En(); - LIBWINE_Register_Es(); - LIBWINE_Register_Fr(); - LIBWINE_Register_Sw(); - LIBWINE_Register_Fi(); - #endif - /* Setup Globals */ Globals.bAnalog = TRUE; Globals.bSeconds = TRUE; diff --git a/programs/clock/rsrc.rc b/programs/clock/rsrc.rc new file mode 100644 index 00000000000..8db7d47ef1c --- /dev/null +++ b/programs/clock/rsrc.rc @@ -0,0 +1,24 @@ + +#include "windows.h" +#include "main.h" + +#define CONCAT(a, b) CONCAT1(a, b) +#define CONCAT1(a, b) a##b + +#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str +#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) +#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids + +#define STRINGIFY(str) STRINGIFY1(str) +#define STRINGIFY1(str) #str + +#include "Da.rc" +#include "De.rc" +#include "En.rc" +#include "Es.rc" +#include "Fi.rc" +#include "Fr.rc" +#include "Pt.rc" +#include "Sw.rc" +#include "Wa.rc" + diff --git a/programs/notepad/.cvsignore b/programs/notepad/.cvsignore index 1d8f959c728..4a473777faa 100644 --- a/programs/notepad/.cvsignore +++ b/programs/notepad/.cvsignore @@ -8,3 +8,4 @@ Makefile Pt.s Sw.s notepad +rsrc.s diff --git a/programs/notepad/Makefile.in b/programs/notepad/Makefile.in index 74aeda3273b..defede0a00c 100644 --- a/programs/notepad/Makefile.in +++ b/programs/notepad/Makefile.in @@ -6,29 +6,19 @@ VPATH = @srcdir@ MODULE = none PROGRAMS = notepad ALL_LIBS = $(WINELIB) $(X_LIBS) $(XLIB) $(LIBS) -RCFLAGS = -w32 -h -WRCEXTRA = -t -A -p $* +WRCEXTRA = -t -A -p notepad -LANGUAGES = En Da De Fr Sw Es Fi Wa Pt LICENSELANG = En -MOSTSRCS = \ +C_SRCS = \ license.c \ main.c \ dialog.c \ language.c \ - search.c - -# Some strings need addresses >= 0x10000 -STRINGSRCS = \ + search.c \ $(LICENSELANG:%=License_%.c) -RC_SRCS = $(LANGUAGES:%=%.rc) - -C_SRCS = $(MOSTSRCS) $(STRINGSRCS) - -MOSTOBJS = $(MOSTSRCS:.c=.o) -STRINGOBJS = $(STRINGSRCS:.c=.o) $(RC_SRCS:.rc=.o) +RC_SRCS = rsrc.rc all: check_wrc $(PROGRAMS) @@ -40,21 +30,13 @@ depend:: .rc.s: $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -o $*.s -.rc.h: - $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -nH $*.h +notepad: $(OBJS) $(WINESTUB) + $(CC) -o notepad $(OBJS) $(LDOPTIONS) $(ALL_LIBS) - -notepad: $(MOSTOBJS) $(STRINGOBJS) $(WINESTUB) - $(CC) -o notepad $(MOSTOBJS) $(LDOPTIONS) $(ALL_LIBS) $(STRINGOBJS) - -install: dummy +install:: dummy $(INSTALL_PROGRAM) notepad $(bindir)/notepad -uninstall: dummy +uninstall:: dummy $(RM) $(bindir)/notepad -$(RC_SRCS:.rc=.s): $(WRC) - -dummy: - ### Dependencies: diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c index e4c94281dbb..f8ebd36b3a9 100644 --- a/programs/notepad/dialog.c +++ b/programs/notepad/dialog.c @@ -5,6 +5,7 @@ * To be distributed under the Wine License */ +#include #include #include #include diff --git a/programs/notepad/main.c b/programs/notepad/main.c index 388ba6c9344..b09bef37304 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -17,22 +17,6 @@ #include "dialog.h" #include "language.h" -#if !defined(LCC) || defined(WINELIB) -#include "shell.h" -#endif - -#ifdef WINELIB -#include "options.h" -#include "resource.h" -void LIBWINE_Register_Da(); -void LIBWINE_Register_De(); -void LIBWINE_Register_En(); -void LIBWINE_Register_Es(); -void LIBWINE_Register_Fi(); -void LIBWINE_Register_Fr(); -void LIBWINE_Register_Sw(); -#endif - NOTEPAD_GLOBALS Globals; /*********************************************************************** @@ -158,17 +142,6 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) char className[] = "NPClass"; /* To make sure className >= 0x10000 */ char winName[] = "Notepad"; - #if defined(WINELIB) && !defined(HAVE_WINE_CONSTRUCTOR) - /* Register resources */ - LIBWINE_Register_Da(); - LIBWINE_Register_De(); - LIBWINE_Register_En(); - LIBWINE_Register_Es(); - LIBWINE_Register_Fi(); - LIBWINE_Register_Fr(); - LIBWINE_Register_Sw(); - #endif - /* Select Language */ LANGUAGE_Init(); diff --git a/programs/notepad/main.h b/programs/notepad/main.h index 47c441779ee..b42880ef9ac 100644 --- a/programs/notepad/main.h +++ b/programs/notepad/main.h @@ -85,12 +85,12 @@ extern CHAR STRING_PAGESETUP_Xx[]; #define IDS_OUT_OF_MEMORY STRINGID(0C) #define IDS_UNTITLED STRINGID(0D) -#define IDS_PAGESETUP_HEADERVALUE STRINGID(0D) -#define IDS_PAGESETUP_FOOTERVALUE STRINGID(0E) -#define IDS_PAGESETUP_LEFTVALUE STRINGID(0F) -#define IDS_PAGESETUP_RIGHTVALUE STRINGID(010) -#define IDS_PAGESETUP_TOPVALUE STRINGID(011) -#define IDS_PAGESETUP_BOTTOMVALUE STRINGID(012) +#define IDS_PAGESETUP_HEADERVALUE STRINGID(0E) +#define IDS_PAGESETUP_FOOTERVALUE STRINGID(0F) +#define IDS_PAGESETUP_LEFTVALUE STRINGID(10) +#define IDS_PAGESETUP_RIGHTVALUE STRINGID(11) +#define IDS_PAGESETUP_TOPVALUE STRINGID(12) +#define IDS_PAGESETUP_BOTTOMVALUE STRINGID(13) /* main menu */ diff --git a/programs/notepad/notepad.rc b/programs/notepad/notepad.rc index 9d19d248c33..fa14a82face 100644 --- a/programs/notepad/notepad.rc +++ b/programs/notepad/notepad.rc @@ -5,12 +5,6 @@ * To be distributed under the Wine License */ -#include "windows.h" -#include "main.h" - -#define CONCAT(a, b) CONCAT1(a, b) -#define CONCAT1(a, b) a##b - /* Main Menu */ CONCAT(MENU_, LANGUAGE_ID) MENU @@ -76,13 +70,13 @@ EDITTEXT NP_PAGESETUP_TAIL, 60, 22,110, 12, WS_BOR GROUPBOX DIALOG_PAGESETUP_MARGIN, NP_PAGESETUP_MARGIN, 10, 43,160, 45 LTEXT DIALOG_PAGESETUP_LEFT, NP_PAGESETUP_LEFT_TXT, 20, 55, 30, 10, WS_CHILD -EDITTEXT STRING_PAGESETUP_LEFTVALUE, NP_PAGESETUP_LEFT, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP +EDITTEXT /*STRING_PAGESETUP_LEFTVALUE,*/ NP_PAGESETUP_LEFT, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP LTEXT DIALOG_PAGESETUP_TOP, NP_PAGESETUP_TOP_TXT, 20, 73, 30, 10, WS_CHILD -EDITTEXT STRING_PAGESETUP_TOPVALUE, NP_PAGESETUP_TOP, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP +EDITTEXT /*STRING_PAGESETUP_TOPVALUE,*/ NP_PAGESETUP_TOP, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP LTEXT DIALOG_PAGESETUP_RIGHT, NP_PAGESETUP_RIGHT_TXT, 100, 55, 30, 10, WS_CHILD -EDITTEXT STRING_PAGESETUP_RIGHTVALUE, NP_PAGESETUP_RIGHT, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP +EDITTEXT /*STRING_PAGESETUP_RIGHTVALUE,*/ NP_PAGESETUP_RIGHT, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP LTEXT DIALOG_PAGESETUP_BOTTOM, NP_PAGESETUP_BOTTOM_TXT,100, 73, 30, 10, WS_CHILD -EDITTEXT STRING_PAGESETUP_BOTTOMVALUE, NP_PAGESETUP_BOTTOM, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP +EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ NP_PAGESETUP_BOTTOM, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP DEFPUSHBUTTON DIALOG_OK, IDOK, 180, 3, 40, 15, WS_TABSTOP @@ -93,13 +87,6 @@ PUSHBUTTON DIALOG_HELP, NP_HELP, 180, 39, 40, 15, WS_TAB /* Strings */ -#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str -#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) -#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids - -#define STRINGIFY(str) STRINGIFY1(str) -#define STRINGIFY1(str) #str - #define STRING_LANGUAGE_ID STRINGIFY(LANGUAGE_ID) #define STRING_LANGUAGE_MENU_ITEM LANGUAGE_MENU_ITEM @@ -126,3 +113,76 @@ ADDSTRING(PAGESETUP_RIGHTVALUE) ADDSTRING(PAGESETUP_TOPVALUE) ADDSTRING(PAGESETUP_BOTTOMVALUE) } + + +/* Undefine all language-specific strings */ + +#undef LANGUAGE_ID +#undef LANGUAGE_NUMBER +#undef LANGUAGE_MENU_ITEM + +#undef MENU_FILE +#undef MENU_FILE_NEW +#undef MENU_FILE_OPEN +#undef MENU_FILE_SAVE +#undef MENU_FILE_SAVEAS +#undef MENU_FILE_PRINT +#undef MENU_FILE_PAGESETUP +#undef MENU_FILE_PRINTSETUP +#undef MENU_FILE_EXIT +#undef MENU_EDIT +#undef MENU_EDIT_UNDO +#undef MENU_EDIT_CUT +#undef MENU_EDIT_COPY +#undef MENU_EDIT_PASTE +#undef MENU_EDIT_DELETE +#undef MENU_EDIT_SELECTALL +#undef MENU_EDIT_TIMEDATE +#undef MENU_EDIT_WRAP +#undef MENU_SEARCH +#undef MENU_SEARCH_SEARCH +#undef MENU_SEARCH_NEXT +#undef MENU_LANGUAGE +#undef MENU_HELP +#undef MENU_HELP_CONTENTS +#undef MENU_HELP_SEARCH +#undef MENU_HELP_HELP_ON_HELP +#undef MENU_INFO +#undef MENU_INFO_LICENSE +#undef MENU_INFO_NO_WARRANTY +#undef MENU_INFO_ABOUT_WINE + +#undef DIALOG_OK +#undef DIALOG_CANCEL +#undef DIALOG_BROWSE +#undef DIALOG_HELP +#undef DIALOG_PAGESETUP_CAPTION +#undef DIALOG_PAGESETUP_HEAD +#undef DIALOG_PAGESETUP_TAIL +#undef DIALOG_PAGESETUP_MARGIN +#undef DIALOG_PAGESETUP_LEFT +#undef DIALOG_PAGESETUP_RIGHT +#undef DIALOG_PAGESETUP_TOP +#undef DIALOG_PAGESETUP_BOTTOM + +#undef STRING_LANGUAGE_ID +#undef STRING_LANGUAGE_MENU_ITEM +#undef STRING_PAGESETUP_HEADERVALUE +#undef STRING_PAGESETUP_FOOTERVALUE +#undef STRING_PAGESETUP_LEFTVALUE +#undef STRING_PAGESETUP_RIGHTVALUE +#undef STRING_PAGESETUP_TOPVALUE +#undef STRING_PAGESETUP_BOTTOMVALUE +#undef STRING_NOTEPAD +#undef STRING_ERROR +#undef STRING_WARNING +#undef STRING_INFO +#undef STRING_UNTITLED +#undef STRING_ALL_FILES +#undef STRING_TEXT_FILES_TXT +#undef STRING_TOOLARGE +#undef STRING_NOTEXT +#undef STRING_NOTSAVED +#undef STRING_NOTFOUND +#undef STRING_OUT_OF_MEMORY + diff --git a/programs/notepad/rsrc.rc b/programs/notepad/rsrc.rc new file mode 100644 index 00000000000..8db7d47ef1c --- /dev/null +++ b/programs/notepad/rsrc.rc @@ -0,0 +1,24 @@ + +#include "windows.h" +#include "main.h" + +#define CONCAT(a, b) CONCAT1(a, b) +#define CONCAT1(a, b) a##b + +#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str +#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) +#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids + +#define STRINGIFY(str) STRINGIFY1(str) +#define STRINGIFY1(str) #str + +#include "Da.rc" +#include "De.rc" +#include "En.rc" +#include "Es.rc" +#include "Fi.rc" +#include "Fr.rc" +#include "Pt.rc" +#include "Sw.rc" +#include "Wa.rc" + diff --git a/programs/progman/.cvsignore b/programs/progman/.cvsignore index 58c92b09c8c..a5dd727e157 100644 --- a/programs/progman/.cvsignore +++ b/programs/progman/.cvsignore @@ -28,3 +28,4 @@ Wa.s accel.h accel.s progman +rsrc.s diff --git a/programs/progman/Makefile.in b/programs/progman/Makefile.in index bd297c99e7c..2762804792b 100644 --- a/programs/progman/Makefile.in +++ b/programs/progman/Makefile.in @@ -6,59 +6,37 @@ VPATH = @srcdir@ MODULE = none PROGRAMS = progman ALL_LIBS = $(WINELIB) $(X_LIBS) $(XLIB) $(LIBS) -RCFLAGS = -w32 -h -WRCEXTRA = -t -A -p $* +WRCEXTRA = -t -A -p progman -LANGUAGES = En Da De Fr Fi Ko Hu It Va Sw Es Wa Pt LICENSELANG = En -MOSTSRCS = \ +C_SRCS = \ dialog.c \ group.c \ grpfile.c \ license.c \ main.c \ - program.c - -# Some strings need addresses >= 0x10000 -STRINGSRCS = \ + program.c \ string.c \ $(LICENSELANG:%=License_%.c) -RC_SRCS = \ - accel.rc \ - $(LANGUAGES:%=%.rc) - -C_SRCS = $(MOSTSRCS) $(STRINGSRCS) - -MOSTOBJS = $(MOSTSRCS:.c=.o) -STRINGOBJS = $(STRINGSRCS:.c=.o) $(RC_SRCS:.rc=.o) +RC_SRCS = rsrc.rc all: check_wrc $(PROGRAMS) -depend:: $(RC_SRCS:.rc=.h) - @MAKE_RULES@ # Override resource compiler rules .rc.s: $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -o $*.s -.rc.h: - $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -nH $*.h +progman: $(OBJS) $(WINESTUB) + $(CC) -o progman $(OBJS) $(LDOPTIONS) $(ALL_LIBS) - -progman: $(MOSTOBJS) $(STRINGOBJS) $(WINESTUB) - $(CC) -o progman $(MOSTOBJS) $(LDOPTIONS) $(ALL_LIBS) $(STRINGOBJS) - -install: dummy +install:: dummy $(INSTALL_PROGRAM) progman $(bindir)/progman -uninstall: dummy +uninstall:: dummy $(RM) $(bindir)/progman -$(RC_SRCS:.rc=.s): $(WRC) - -dummy: - ### Dependencies: diff --git a/programs/progman/Xx.rc b/programs/progman/Xx.rc index 6f5a96ad52e..42d8fc1788b 100644 --- a/programs/progman/Xx.rc +++ b/programs/progman/Xx.rc @@ -4,12 +4,6 @@ * Copyright 1996 Ulrich Schmid */ -#include "windows.h" -#include "progman.h" - -#define CONCAT(a, b) CONCAT1(a, b) -#define CONCAT1(a, b) a##b - /* Menu */ CONCAT(MENU_, LANGUAGE_ID) MENU @@ -179,13 +173,6 @@ PUSHBUTTON DIALOG_HELP, PM_HELP, 135, 65, 60, 15, WS_TABSTOP /* Strings */ -#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str -#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) -#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids - -#define STRINGIFY(str) STRINGIFY1(str) -#define STRINGIFY1(str) #str - #define STRING_LANGUAGE_ID STRINGIFY(LANGUAGE_ID) #define STRING_LANGUAGE_MENU_ITEM LANGUAGE_MENU_ITEM @@ -216,3 +203,97 @@ ADDSTRING(LIBRARIES_DLL) ADDSTRING(SYMBOL_FILES) ADDSTRING(SYMBOLS_ICO) } + + +/* Undefine all language-specific strings */ + +#undef LANGUAGE_ID +#undef LANGUAGE_NUMBER +#undef LANGUAGE_MENU_ITEM + +#undef MENU_FILE +#undef MENU_FILE_NEW +#undef MENU_FILE_OPEN +#undef MENU_FILE_MOVE +#undef MENU_FILE_COPY +#undef MENU_FILE_DELETE +#undef MENU_FILE_ATTRIBUTES +#undef MENU_FILE_EXECUTE +#undef MENU_FILE_EXIT +#undef MENU_OPTIONS +#undef MENU_OPTIONS_AUTO_ARRANGE +#undef MENU_OPTIONS_MIN_ON_RUN +#undef MENU_OPTIONS_SAVE_SETTINGS +#undef MENU_WINDOWS +#undef MENU_WINDOWS_OVERLAP +#undef MENU_WINDOWS_SIDE_BY_SIDE +#undef MENU_WINDOWS_ARRANGE +#undef MENU_LANGUAGE +#undef MENU_HELP +#undef MENU_HELP_CONTENTS +#undef MENU_HELP_SEARCH +#undef MENU_HELP_HELP_ON_HELP +#undef MENU_HELP_TUTORIAL +#undef MENU_INFO +#undef MENU_INFO_LICENSE +#undef MENU_INFO_NO_WARRANTY +#undef MENU_INFO_ABOUT_WINE + +#undef DIALOG_OK +#undef DIALOG_CANCEL +#undef DIALOG_BROWSE +#undef DIALOG_HELP +#undef DIALOG_NEW_CAPTION +#undef DIALOG_NEW_NEW +#undef DIALOG_NEW_GROUP +#undef DIALOG_NEW_PROGRAM +#undef DIALOG_MOVE_CAPTION +#undef DIALOG_MOVE_PROGRAM +#undef DIALOG_MOVE_FROM_GROUP +#undef DIALOG_MOVE_TO_GROUP +#undef DIALOG_COPY_CAPTION +#undef DIALOG_COPY_PROGRAM +#undef DIALOG_COPY_FROM_GROUP +#undef DIALOG_COPY_TO_GROUP +#undef DIALOG_GROUP_CAPTION +#undef DIALOG_GROUP_DESCRIPTION +#undef DIALOG_GROUP_FILE +#undef DIALOG_PROGRAM_CAPTION +#undef DIALOG_PROGRAM_DESCRIPTION +#undef DIALOG_PROGRAM_COMMAND_LINE +#undef DIALOG_PROGRAM_DIRECTORY +#undef DIALOG_PROGRAM_HOT_KEY +#undef DIALOG_PROGRAM_SYMBOL +#undef DIALOG_PROGRAM_OTHER_SYMBOL +#undef DIALOG_SYMBOL_CAPTION +#undef DIALOG_SYMBOL_FILE +#undef DIALOG_SYMBOL_CURRENT +#undef DIALOG_EXECUTE_CAPTION +#undef DIALOG_EXECUTE_COMMAND_LINE +#undef DIALOG_EXECUTE_SYMBOL + +#undef STRING_LANGUAGE_ID +#undef STRING_LANGUAGE_MENU_ITEM +#undef STRING_PROGRAM_MANAGER +#undef STRING_ERROR +#undef STRING_WARNING +#undef STRING_INFO +#undef STRING_DELETE +#undef STRING_DELETE_GROUP_s +#undef STRING_DELETE_PROGRAM_s +#undef STRING_NOT_IMPLEMENTED +#undef STRING_FILE_READ_ERROR_s +#undef STRING_FILE_WRITE_ERROR_s +#undef STRING_GRPFILE_READ_ERROR_s +#undef STRING_OUT_OF_MEMORY +#undef STRING_WINHELP_ERROR +#undef STRING_UNKNOWN_FEATURE_s +#undef STRING_FILE_NOT_OVERWRITTEN_s +#undef STRING_SAVE_GROUP_AS_s +#undef STRING_NO_HOT_KEY +#undef STRING_ALL_FILES +#undef STRING_PROGRAMS +#undef STRING_LIBRARIES_DLL +#undef STRING_SYMBOL_FILES +#undef STRING_SYMBOLS_ICO + diff --git a/programs/progman/accel.rc b/programs/progman/accel.rc index 11f0208dec0..ac19baf28de 100644 --- a/programs/progman/accel.rc +++ b/programs/progman/accel.rc @@ -1,6 +1,3 @@ -#include "windows.h" -#include "progman.h" - ACCEL ACCELERATORS { VK_RETURN, PM_EXECUTE, VIRTKEY, ALT diff --git a/programs/progman/main.c b/programs/progman/main.c index f682a94f51e..44ccfff32aa 100644 --- a/programs/progman/main.c +++ b/programs/progman/main.c @@ -8,18 +8,9 @@ #include "windows.h" #include "license.h" #include "progman.h" + #ifdef WINELIB -#include "resource.h" #include "options.h" -#include "shell.h" -void LIBWINE_Register_accel(); -void LIBWINE_Register_De(); -void LIBWINE_Register_En(); -void LIBWINE_Register_Fi(); -void LIBWINE_Register_Fr(); -void LIBWINE_Register_It(); -void LIBWINE_Register_Ko(); -void LIBWINE_Register_Hu(); #endif GLOBALS Globals; @@ -42,18 +33,6 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) { MSG msg; -#if defined(WINELIB) && !defined(HAVE_WINE_CONSTRUCTOR) - /* Register resources */ - LIBWINE_Register_accel(); - LIBWINE_Register_De(); - LIBWINE_Register_En(); - LIBWINE_Register_Fi(); - LIBWINE_Register_Fr(); - LIBWINE_Register_It(); - LIBWINE_Register_Ko(); - LIBWINE_Register_Hu(); -#endif - #ifndef WINELIB Globals.lpszIniFile = "progman.ini"; Globals.lpszIcoFile = "progman.ico"; diff --git a/programs/progman/rsrc.rc b/programs/progman/rsrc.rc new file mode 100644 index 00000000000..22a6a3bee05 --- /dev/null +++ b/programs/progman/rsrc.rc @@ -0,0 +1,30 @@ + +#include "windows.h" +#include "progman.h" + +#define CONCAT(a, b) CONCAT1(a, b) +#define CONCAT1(a, b) a##b + +#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str +#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) +#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids + +#define STRINGIFY(str) STRINGIFY1(str) +#define STRINGIFY1(str) #str + +#include "accel.rc" + +#include "Da.rc" +#include "De.rc" +#include "En.rc" +#include "Es.rc" +#include "Fi.rc" +#include "Fr.rc" +#include "Hu.rc" +#include "It.rc" +#include "Ko.rc" +#include "Pt.rc" +#include "Sw.rc" +#include "Va.rc" +#include "Wa.rc" + diff --git a/programs/winhelp/.cvsignore b/programs/winhelp/.cvsignore index 297781a324d..60f04904580 100644 --- a/programs/winhelp/.cvsignore +++ b/programs/winhelp/.cvsignore @@ -27,6 +27,7 @@ Wa.h Wa.s hlp2sgml lex.yy.c +rsrc.s winhelp y.tab.c y.tab.h diff --git a/programs/winhelp/Makefile.in b/programs/winhelp/Makefile.in index 0dea79371a2..6637746c9f0 100644 --- a/programs/winhelp/Makefile.in +++ b/programs/winhelp/Makefile.in @@ -6,32 +6,22 @@ VPATH = @srcdir@ MODULE = none PROGRAMS = winhelp hlp2sgml ALL_LIBS = $(WINELIB) $(X_LIBS) $(XLIB) $(LIBS) -RCFLAGS = -w32 -h -WRCEXTRA = -t -A -p $* +WRCEXTRA = -t -A -p winhelp -LANGUAGES = En Da De Fr Fi Ko Hu It Va Sw Es Wa Pt - -MOSTSRCS = \ +C_SRCS = \ winhelp.c \ hlpfile.c \ - macro.c - -# Some strings need addresses >= 0x10000 -STRINGSRCS = string.c + macro.c \ + string.c EXTRA_SRCS = macro.yacc.y macro.lex.l EXTRA_OBJS = y.tab.o lex.yy.o -RC_SRCS = $(LANGUAGES:%=%.rc) - -C_SRCS = $(MOSTSRCS) $(STRINGSRCS) - -MOSTOBJS = $(MOSTSRCS:.c=.o) $(EXTRA_OBJS) -STRINGOBJS = $(STRINGSRCS:.c=.o) $(RC_SRCS:.rc=.o) +RC_SRCS = rsrc.rc all: check_wrc $(PROGRAMS) -depend:: $(RC_SRCS:.rc=.h) y.tab.h +depend:: y.tab.h @MAKE_RULES@ @@ -39,21 +29,17 @@ depend:: $(RC_SRCS:.rc=.h) y.tab.h .rc.s: $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -o $*.s -.rc.h: - $(CPP) $(DEFS) $(OPTIONS) $(DIVINCL) -DRC_INVOKED -P -x c $< | $(WRC) $(WRCFLAGS) $(WRCEXTRA) -nH $*.h - -# Some strings need addresses >= 0x10000 -winhelp: $(MOSTOBJS) $(STRINGOBJS) $(WINESTUB) - $(CC) -o winhelp $(MOSTOBJS) $(LDOPTIONS) $(ALL_LIBS) $(STRINGOBJS) +winhelp: $(OBJS) $(WINESTUB) + $(CC) -o winhelp $(OBJS) $(LDOPTIONS) $(ALL_LIBS) hlp2sgml: hlp2sgml.o hlpfile.o $(CC) -o hlp2sgml hlp2sgml.o hlpfile.o -install: dummy +install:: dummy $(INSTALL_PROGRAM) winhelp $(bindir)/winhelp $(INSTALL_PROGRAM) hlp2sgml $(bindir)/hlp2sgml -uninstall: dummy +uninstall:: dummy $(RM) $(bindir)/winhelp $(bindir)/hlp2sgml y.tab.c y.tab.h: macro.yacc.y @@ -62,8 +48,4 @@ y.tab.c y.tab.h: macro.yacc.y lex.yy.c: macro.lex.l $(LEX) -8 -i $(SRCDIR)/macro.lex.l -$(RC_SRCS:.rc=.s): $(WRC) - -dummy: - ### Dependencies: diff --git a/programs/winhelp/Pt.rc b/programs/winhelp/Pt.rc index 5fb761823cd..76fb0d3fa3b 100644 --- a/programs/winhelp/Pt.rc +++ b/programs/winhelp/Pt.rc @@ -8,7 +8,7 @@ /* This file is not yet complete !! */ #define LANGUAGE_ID Pt -#define LANGUAGE_NUMBER 0 +#define LANGUAGE_NUMBER 16 /* Menu */ diff --git a/programs/winhelp/Xx.rc b/programs/winhelp/Xx.rc index cfe0b82b1d1..bf5f4952175 100644 --- a/programs/winhelp/Xx.rc +++ b/programs/winhelp/Xx.rc @@ -4,12 +4,6 @@ * Copyright 1996 Ulrich Schmid */ -#include "windows.h" -#include "winhelp.h" - -#define CONCAT(a, b) CONCAT1(a, b) -#define CONCAT1(a, b) a##b - /* Menu */ CONCAT(MENU_, LANGUAGE_ID) MENU @@ -43,7 +37,7 @@ CONCAT(MENU_, LANGUAGE_ID) MENU /* Dialogs */ -DIALOG_TEST DIALOG 0, 0, 150, 22 +CONCAT(DIALOG_TEST_, LANGUAGE_ID) DIALOG 0, 0, 150, 22 STYLE DS_MODALFRAME CAPTION "Macro Test" { @@ -54,13 +48,6 @@ DEFPUSHBUTTON "OK", IDOK, 110, 5, 35, 12 /* Strings */ -#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str -#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) -#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids - -#define STRINGIFY(str) STRINGIFY1(str) -#define STRINGIFY1(str) #str - #define STRING_LANGUAGE_ID STRINGIFY(LANGUAGE_ID) STRINGTABLE @@ -79,3 +66,40 @@ ADDSTRING(HISTORY) ADDSTRING(ALL_FILES) ADDSTRING(HELP_FILES_HLP) } + + +/* Undefine all language-specific strings */ + +#undef LANGUAGE_ID +#undef LANGUAGE_NUMBER + +#undef MENU_FILE +#undef MENU_FILE_OPEN +#undef MENU_FILE_PRINT +#undef MENU_FILE_PRINTER_SETUP +#undef MENU_FILE_EXIT +#undef MENU_EDIT +#undef MENU_EDIT_COPY_DIALOG +#undef MENU_EDIT_ANNOTATE +#undef MENU_BOOKMARK +#undef MENU_BOOKMARK_DEFINE +#undef MENU_HELP +#undef MENU_HELP_ON_HELP +#undef MENU_HELP_ON_TOP +#undef MENU_HELP_INFO +#undef MENU_HELP_ABOUT_WINE + +#undef STRING_LANGUAGE_ID +#undef STRING_WINE_HELP +#undef STRING_ERROR +#undef STRING_WARNING +#undef STRING_INFO +#undef STRING_NOT_IMPLEMENTED +#undef STRING_HLPFILE_ERROR_s +#undef STRING_CONTENTS +#undef STRING_SEARCH +#undef STRING_BACK +#undef STRING_HISTORY +#undef STRING_ALL_FILES +#undef STRING_HELP_FILES_HLP + diff --git a/programs/winhelp/rsrc.rc b/programs/winhelp/rsrc.rc new file mode 100644 index 00000000000..36e8f8ff39d --- /dev/null +++ b/programs/winhelp/rsrc.rc @@ -0,0 +1,28 @@ + +#include "windows.h" +#include "winhelp.h" + +#define CONCAT(a, b) CONCAT1(a, b) +#define CONCAT1(a, b) a##b + +#define ADDSTRING(str) ADDSTRING1(LANGUAGE_NUMBER, IDS_ ## str) STRING_ ## str +#define ADDSTRING1(langnum, ids) ADDSTRING2(langnum, ids) +#define ADDSTRING2(langnum, ids) 0x ## langnum ## ids + +#define STRINGIFY(str) STRINGIFY1(str) +#define STRINGIFY1(str) #str + +#include "Da.rc" +#include "De.rc" +#include "En.rc" +#include "Es.rc" +#include "Fi.rc" +#include "Fr.rc" +#include "Hu.rc" +#include "It.rc" +#include "Ko.rc" +#include "Pt.rc" +#include "Sw.rc" +#include "Va.rc" +#include "Wa.rc" + diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c index 7fd17bd31df..39271a82e7c 100644 --- a/programs/winhelp/winhelp.c +++ b/programs/winhelp/winhelp.c @@ -6,22 +6,11 @@ #include #include "windows.h" -#ifdef WINELIB -#include "resource.h" -#include "options.h" -#include "shell.h" -#endif #include "winhelp.h" -VOID LIBWINE_Register_De(void); -VOID LIBWINE_Register_En(void); -VOID LIBWINE_Register_Fi(void); -VOID LIBWINE_Register_Fr(void); -VOID LIBWINE_Register_Hu(void); -VOID LIBWINE_Register_It(void); -VOID LIBWINE_Register_Ko(void); -VOID LIBWINE_Register_Sw(void); -VOID LIBWINE_Register_Va(void); +#ifdef WINELIB +#include "options.h" +#endif static BOOL WINHELP_RegisterWinClasses(); static LRESULT WINHELP_MainWndProc(HWND, UINT, WPARAM, LPARAM); @@ -54,18 +43,6 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show) LONG lHash = 0; INT langnum; -#if defined(WINELIB) && !defined(HAVE_WINE_CONSTRUCTOR) - /* Register resources */ - LIBWINE_Register_De(); - LIBWINE_Register_En(); - LIBWINE_Register_Fi(); - LIBWINE_Register_Fr(); - LIBWINE_Register_It(); - LIBWINE_Register_Ko(); - LIBWINE_Register_Hu(); - LIBWINE_Register_Va(); -#endif - Globals.hInstance = hInstance; /* Get options */