From: Hugh McMaster Subject: [4/4] regsvr32: Fix a number of errors in the comments of regsvr32.c Message-Id: <9CB7F20010CADE479EB89B7DCEDFB642687E60AE65@VMBX112.ihostexchange.net> Date: Tue, 29 Apr 2014 02:14:25 -0400 This patch fixes a number of spelling, grammar and logic errors in the comments of regsvr32.c. I have removed the usage block comment, as Nikolay Sivov believes "it doesn't add any useful information". This patch is the final patch of a series of four: 1. Implement new argument/flag handler. 2. Convert source to Unicode. 3. Add WriteFile() support if WriteConsoleW() fails. 4. Improve source comments (e.g. spelling, grammar, etc.) From 74cc0377a7de9eb3cb6543b1ec79739e29fcd629 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Mon, 28 Apr 2014 20:47:37 +1000 Subject: regsvr32-comment-fixes --- programs/regsvr32/regsvr32.c | 47 ++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c index 1134ac1..be1aa00 100644 --- a/programs/regsvr32/regsvr32.c +++ b/programs/regsvr32/regsvr32.c @@ -19,32 +19,6 @@ * 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 - * - * This version deliberately differs in error handling compared to the - * windows version. - */ - -/* - * - * regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname ... - * [/u] unregister server - * [/s] silent (no message boxes) - * [/i] Call DllInstall passing it an optional [cmdline]; - * when used with /u calls dll uninstall. - * [/n] Do not call DllRegisterServer; this option must be used with [/i] - * [/c] Console output (seems to be deprecated and ignored) - * - * Note the complication that this version may be passed unix format file names - * which might be mistaken for flags. Conveniently the Windows version - * requires each flag to be separate (e.g. no /su ) and so we will simply - * assume that anything longer than /. is a filename. - */ - -/** - * FIXME - currently receives command-line parameters in ASCII only and later - * converts to Unicode. Ideally the function should have wWinMain entry point - * and then work in Unicode only, but it seems Wine does not have necessary - * support. */ #define WIN32_LEAN_AND_MEAN @@ -117,13 +91,12 @@ static void __cdecl output_write(UINT id, ...) LocalFree(str); } -/** - * Loads procedure. +/* Loads procedure * * Parameters: - * strDll - name of the dll. - * procName - name of the procedure to load from dll - * pDllHanlde - output variable receives handle of the loaded dll. + * strDll - name of the DLL. + * procName - name of the procedure to load from the DLL. + * pDllHandle - output variable that receives the handle of the loaded DLL. */ static VOID *LoadProc(const WCHAR *strDll, const char *procName, HMODULE *DllHandle) { @@ -250,6 +223,16 @@ static WCHAR *parse_cmdline(WCHAR *command_line) return command_line; } +/* This program may be passed Unix format filenames that may be mistaken + * for flags. Conveniently, the Windows version requires each flag to be + * separate (e.g. no /su), so we will simply assume that anything longer + * than /. is a filename. + * + * This program deliberately differs from the Windows version in its + * error handling. + */ + +/* FIXME - This should ideally be a wWinMain entry point. */ int wmain(int argc, WCHAR *argv[]) { int i; @@ -261,7 +244,7 @@ int wmain(int argc, WCHAR *argv[]) OleInitialize(NULL); - /* Strictly, the Microsoft version processes all the flags before + /* Strictly, the Microsoft version processes all of the flags before * the files (e.g. regsvr32 file1 /s file2 is silent even for file1). * For ease, we will not replicate that and will process the arguments * in order. -- 1.8.3.2