From c9cf70d4484a3cf339d86a0b46734d60178a13ae Mon Sep 17 00:00:00 2001
From: Andreas Mohr <amohr@codeweavers.com>
Date: Fri, 26 Jan 2001 20:40:50 +0000
Subject: [PATCH] Some more cleanups.

---
 dlls/commdlg/colordlg.c  | 10 +++++-----
 dlls/ole32/filemoniker.c | 17 +++++++++--------
 dlls/shell32/shellpath.c |  4 ++--
 dlls/user/user.spec      |  2 +-
 dlls/winmm/mmsystem.c    |  2 +-
 files/file.c             |  8 ++++----
 memory/atom.c            |  2 +-
 programs/regapi/regapi.c |  4 ++--
 windows/dce.c            |  4 ++--
 windows/winhelp.c        |  4 ++--
 windows/winproc.c        |  2 +-
 11 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/dlls/commdlg/colordlg.c b/dlls/commdlg/colordlg.c
index 4ebca642c43..108c01946d1 100644
--- a/dlls/commdlg/colordlg.c
+++ b/dlls/commdlg/colordlg.c
@@ -454,11 +454,11 @@ static void CC_PaintTriangle( HWND hDlg, int y)
    height = rect.bottom;
    hDC = GetDC(hDlg);
    points[0].y = rect.top;
-   points[0].x = rect.right;           /*  |  /|  */
-   ClientToScreen(hwnd, points);    /*  | / |  */
-   ScreenToClient(hDlg, points);    /*  |<  |  */
-   oben = points[0].y;                 /*  | \ |  */
-				     /*  |  \|  */
+   points[0].x = rect.right;     /*  |  /|  */
+   ClientToScreen(hwnd, points); /*  | / |  */
+   ScreenToClient(hDlg, points); /*  |<  |  */
+   oben = points[0].y;           /*  | \ |  */
+                                 /*  |  \|  */
    temp = (long)height * (long)y;
    points[0].y = oben + height - temp / (long)MAXVERT;
    points[1].y = points[0].y + w;
diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c
index fefdcff36de..25d103f6303 100644
--- a/dlls/ole32/filemoniker.c
+++ b/dlls/ole32/filemoniker.c
@@ -5,6 +5,7 @@
  ***************************************************************************************/
 
 #include <assert.h>
+#include <string.h>
 #include "winbase.h"
 #include "winerror.h"
 #include "winnls.h"
@@ -244,7 +245,7 @@ HRESULT WINAPI FileMonikerImpl_Load(IMoniker* iface,IStream* pStm)
 
     TRACE("(%p,%p)\n",iface,pStm);
 
-    /* this function locate and read from the stream the filePath string writen by FileMonikerImpl_Save */
+    /* this function locates and reads from the stream the filePath string written by FileMonikerImpl_Save */
 
     /* first WORD is non significative */
     res=IStream_Read(pStm,&wbuffer,sizeof(WORD),&bread);
@@ -322,9 +323,9 @@ HRESULT WINAPI FileMonikerImpl_Save(IMoniker* iface,
 {
     /* this function saves data of this object. In the begining I thougth that I have just to write
      * the filePath string on Stream. But, when I tested this function whith windows programs samples !
-     * I noted that it was not the case. So I analysed data writen by this function on Windows system and 
+     * I noted that it was not the case. So I analysed data written by this function on Windows system and 
      * what did this function do exactly ! but I have no idear a bout its logic !
-     * I guessed data who must be writen on stream wich is:
+     * I guessed data who must be written on stream wich is:
      * 1) WORD constant:zero 2) length of the path string ("\0" included) 3) path string type A
      * 4) DWORD constant : 0xDEADFFFF 5) ten WORD constant: zero  6) DWORD: double-length of the the path
      * string type W ("\0" not included) 7) WORD constant: 0x3 8) filePath unicode string.
@@ -338,7 +339,7 @@ HRESULT WINAPI FileMonikerImpl_Save(IMoniker* iface,
     CHAR*     filePathA;
     DWORD  len;
 
-    DWORD  constant1 = 0xDEADFFFF; /* these constants are detected after analysing the data structure writen by */
+    DWORD  constant1 = 0xDEADFFFF; /* these constants are detected after analysing the data structure written by */
     WORD   constant2 = 0x3;        /* FileMoniker_Save function in a windows program system */
 
     WORD   zero=0;
@@ -351,7 +352,7 @@ HRESULT WINAPI FileMonikerImpl_Save(IMoniker* iface,
     if (pStm==NULL)
         return E_POINTER;
 
-    /* write a DWORD seted to 0 : constant */
+    /* write a DWORD set to 0 : constant */
     res=IStream_Write(pStm,&zero,sizeof(WORD),NULL);
 
     /* write length of filePath string ( "\0" included )*/
@@ -364,11 +365,11 @@ HRESULT WINAPI FileMonikerImpl_Save(IMoniker* iface,
     res=IStream_Write(pStm,filePathA,len,NULL);
     HeapFree(GetProcessHeap(),0,filePathA);
 
-    /* write a DWORD seted to 0xDEADFFFF: constant */
+    /* write a DWORD set to 0xDEADFFFF: constant */
     res=IStream_Write(pStm,&constant1,sizeof(DWORD),NULL);
 	
     len--;
-    /* write 10 times a DWORD seted to 0 : constants */
+    /* write 10 times a DWORD set to 0 : constants */
     for(i=0;i<10;i++)
         res=IStream_Write(pStm,&zero,sizeof(WORD),NULL);
 	
@@ -388,7 +389,7 @@ HRESULT WINAPI FileMonikerImpl_Save(IMoniker* iface,
     /* write double-length (hexa representation) of the path string ( "\0" included ) */
     res=IStream_Write(pStm,&doubleLenHex,sizeof(DWORD),NULL);
 
-    /* write a WORD seted to 0x3: constant */
+    /* write a WORD set to 0x3: constant */
     res=IStream_Write(pStm,&constant2,sizeof(WORD),NULL);
 
     /* write path unicode string */
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index bf1c2a7e1c9..8c408cc54bb 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -705,10 +705,10 @@ static const CSIDL_DATA CSIDL_Data[] =
 	"SendTo",
 	"SendTo"
     },
-    { /* CSIDL_BITBUCKET (??) */
+    { /* CSIDL_BITBUCKET (is this c:\recycled ?) */
 	0, 1, /* FIXME */
 	NULL,
-	NULL
+	"recycled"
     },
     { /* CSIDL_STARTMENU */
 	9, HKCU,
diff --git a/dlls/user/user.spec b/dlls/user/user.spec
index 6428222b8bd..f7960acb281 100644
--- a/dlls/user/user.spec
+++ b/dlls/user/user.spec
@@ -484,7 +484,7 @@ owner	user32
 522 stub WNetDisable
 523 pascal16 WNetRestoreConnection(word ptr) WNetRestoreConnection16
 524 pascal16 WNetWriteJob(word ptr ptr) WNetWriteJob16
-525 pascal16 WnetConnectDialog(word word) WNetConnectDialog
+525 pascal16 WNetConnectDialog(word word) WNetConnectDialog
 526 pascal16 WNetDisconnectDialog(word word) WNetDisconnectDialog16
 527 pascal16 WNetConnectionDialog(word word) WNetConnectionDialog16
 528 pascal16 WNetViewQueueDialog(word ptr) WNetViewQueueDialog16
diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c
index a680ba54b10..ebb4895a61b 100644
--- a/dlls/winmm/mmsystem.c
+++ b/dlls/winmm/mmsystem.c
@@ -3336,7 +3336,7 @@ static	MMRESULT WINAPI MMSYSTEM_MidiStream_Open(HMIDISTRM* lphMidiStrm, LPUINT l
 	return MMSYSERR_NOMEM;	
     }
 
-    /* wait for thread to have started, and for it's queue to be created */
+    /* wait for thread to have started, and for its queue to be created */
     {
 	DWORD	count;
 
diff --git a/files/file.c b/files/file.c
index 84c00014e2c..f5ed7c4acc4 100644
--- a/files/file.c
+++ b/files/file.c
@@ -167,7 +167,7 @@ void FILE_SetDosError(void)
         SetLastError( ERROR_BAD_FORMAT );
         break;
     default:
-        WARN( "unknown file error: %s", strerror(save_errno) );
+        WARN("unknown file error: %s\n", strerror(save_errno) );
         SetLastError( ERROR_GEN_FAILURE );
         break;
     }
@@ -880,8 +880,8 @@ found:
       /* Probable FIXME:
 	 As our loader closes the files after loading the executable,
 	 we can't find the running executable with FILE_InUse.
-	 Perhaps the loader should keep the file open.
-	 Recheck against how Win handles that case */
+	 The loader should keep the file open, as Windows does that, too.
+       */
       {
 	char *last = strrchr(full_name.long_name,'/');
 	if (!last)
@@ -2190,8 +2190,8 @@ BOOL WINAPI LockFile( HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffsetHig
  * RETURNS
  *   success: TRUE
  *   failure: FALSE
- * NOTES
  *
+ * NOTES
  * Per Microsoft docs, the third parameter (reserved) must be set to 0.
  */
 BOOL WINAPI LockFileEx( HANDLE hFile, DWORD flags, DWORD reserved,
diff --git a/memory/atom.c b/memory/atom.c
index f1ea5bf5943..2a4c66a5517 100644
--- a/memory/atom.c
+++ b/memory/atom.c
@@ -514,7 +514,7 @@ ATOM WINAPI AddAtomW( LPCWSTR str )
 
 static ATOM ATOM_DeleteAtom( ATOM atom,  BOOL local)
 {
-    TRACE( "(%s) %x\n", local ? "local" : "glbal", atom );
+    TRACE( "(%s) %x\n", local ? "local" : "global", atom );
     if (atom < MIN_STR_ATOM) atom = 0;
     else
     {
diff --git a/programs/regapi/regapi.c b/programs/regapi/regapi.c
index ceabdffd6d8..b655e2d4dc3 100644
--- a/programs/regapi/regapi.c
+++ b/programs/regapi/regapi.c
@@ -100,7 +100,7 @@ static void doRegisterDLL(LPSTR lpsLine);
 static void doUnregisterDLL(LPSTR lpsLine);
 
 /*
- * current supported api
+ * Currently supported api
  */
 static const char* commandNames[COMMAND_COUNT] = {
   "setValue", 
@@ -139,7 +139,7 @@ static const BOOL commandSaveRegistry[COMMAND_COUNT] = {
 };
 
 /* 
- * Generic prototyes
+ * Generic prototypes
  */
 static DWORD   getDataType(LPSTR *lpValue);
 static LPSTR   getRegKeyName(LPSTR lpLine);
diff --git a/windows/dce.c b/windows/dce.c
index a46e601e452..6a1e70fa362 100644
--- a/windows/dce.c
+++ b/windows/dce.c
@@ -257,7 +257,7 @@ static INT DCE_ReleaseDC( DCE* dce )
  *
  * It is called from SetWindowPos() and EVENT_MapNotify - we have to
  * mark as dirty all busy DCEs for windows that have pWnd->parent as
- * an ansector and whose client rect intersects with specified update
+ * an ancestor and whose client rect intersects with specified update
  * rectangle. In addition, pWnd->parent DCEs may need to be updated if
  * DCX_CLIPCHILDREN flag is set.  */
 BOOL DCE_InvalidateDCE(WND* pWnd, const RECT* pRectUpdate)
@@ -1099,6 +1099,6 @@ BOOL16 WINAPI LockWindowUpdate16( HWND16 hwnd )
  */
 BOOL WINAPI LockWindowUpdate( HWND hwnd )
 {
-    /* FIXME? DCX_LOCKWINDOWUPDATE is unimplemented */
+    FIXME("DCX_LOCKWINDOWUPDATE is unimplemented\n");
     return TRUE;
 }
diff --git a/windows/winhelp.c b/windows/winhelp.c
index ff690f8ad26..362b516a710 100644
--- a/windows/winhelp.c
+++ b/windows/winhelp.c
@@ -78,11 +78,11 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand,
 	if(!hDest) {
 	  if(wCommand == HELP_QUIT) return TRUE;
           if (WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL ) < 32) {
-	      FIXME("cant start winhlp32.exe -x?\n");
+	      ERR("can't start winhlp32.exe -x ?\n");
 	      return FALSE;
 	  }
 	  if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) {
-	      FIXME("did not find MS_WINHELP\n");
+	      FIXME("did not find MS_WINHELP (FindWindow() failed, maybe global window handling still unimplemented)\n");
 	      return FALSE;
 	  }
         }
diff --git a/windows/winproc.c b/windows/winproc.c
index c255cd5c53f..2a9176404ac 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -169,7 +169,7 @@ static LRESULT WINPROC_CallWndProc( WNDPROC proc, HWND hwnd, UINT msg,
     iWndsLocks = WIN_SuspendWndsLock();
     retvalue = WINPROC_wrapper( proc, hwnd, msg, wParam, lParam );
     WIN_RestoreWndsLock(iWndsLocks);
-    TRACE_(relay)("(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx) ret=%08lx\n",
+    TRACE_(relay)("(wndproc=%p,hwnd=%08x,msg=%s,wp=%08x,lp=%08lx) retval=%08lx\n",
                    proc, hwnd, SPY_GetMsgName(msg), wParam, lParam, retvalue );
     return retvalue;
 }
-- 
GitLab