Index: trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp	(revision 75498)
@@ -1,4 +1,5 @@
+/* $Id$ */
 /** @file
- * Shared Clipboard: Win32 host.
+ * Shared Clipboard Service - Win32 host.
  */
 
@@ -15,4 +16,9 @@
  */
 
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
 #include <iprt/win/windows.h>
 
Index: trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h	(revision 75498)
@@ -1,5 +1,5 @@
+/* $Id$ */
 /** @file
- *
- * Shared Clipboard
+ * Shared Clipboard Service - Internal Header.
  */
 
@@ -16,8 +16,7 @@
  */
 
-#ifndef __VBOXCLIPBOARD__H
-#define __VBOXCLIPBOARD__H
+#ifndef ___VBOXCLIPBOARD_H
+#define ___VBOXCLIPBOARD_H
 
-#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
 #include <VBox/hgcmsvc.h>
 #include <VBox/log.h>
@@ -98,3 +97,4 @@
 #endif
 
-#endif /* __VBOXCLIPBOARD__H */
+#endif /* !___VBOXCLIPBOARD_H */
+
Index: trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboard.rc	(revision 75498)
@@ -1,5 +1,5 @@
 /* $Id$ */
 /** @file
- * VBoxSharedClipboard - Resource file containing version info and icon.
+ * Shared Clipboard Service - Resource file containing version info and icon.
  */
 
Index: trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp	(revision 75498)
@@ -1,5 +1,5 @@
 /* $Id$ */
 /** @file
- * Shared Clipboard: Mac OS X host implementation.
+ * Shared Clipboard Service - Mac OS X host implementation.
  */
 
@@ -18,5 +18,8 @@
  */
 
-#define LOG_GROUP LOG_GROUP_HGCM
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
 #include <Carbon/Carbon.h>
 
@@ -29,6 +32,11 @@
 #include "VBox/GuestHost/clipboard-helper.h"
 
+
+/*********************************************************************************************************************************
+*   Defined Constants And Macros                                                                                                 *
+*********************************************************************************************************************************/
 /* For debugging */
 //#define SHOW_CLIPBOARD_CONTENT
+
 
 /**
Index: trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h	(revision 75498)
@@ -1,5 +1,5 @@
 /* $Id$ */
 /** @file
- * Shared Clipboard: Mac OS X host implementation.
+ * Shared Clipboard Service - Mac OS X host implementation.
  */
 
@@ -21,10 +21,10 @@
 typedef struct OpaquePasteboardRef *PasteboardRef;
 
-int initPasteboard (PasteboardRef *pPasteboardRef);
-void destroyPasteboard (PasteboardRef *pPasteboardRef);
+int initPasteboard(PasteboardRef *pPasteboardRef);
+void destroyPasteboard(PasteboardRef *pPasteboardRef);
 
-int queryNewPasteboardFormats (PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged);
-int readFromPasteboard (PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
-int writeToPasteboard (PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
+int queryNewPasteboardFormats(PasteboardRef pPasteboard, uint32_t *pfFormats, bool *pfChanged);
+int readFromPasteboard(PasteboardRef pPasteboard, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcbActual);
+int writeToPasteboard(PasteboardRef pPasteboard, void *pv, uint32_t cb, uint32_t fFormat);
 
 #endif
Index: trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/darwin.cpp	(revision 75498)
@@ -1,5 +1,5 @@
 /* $Id$ */
 /** @file
- * Shared Clipboard: Mac OS X host.
+ * Shared Clipboard Service - Mac OS X host.
  */
 
@@ -16,4 +16,9 @@
  */
 
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
 #include <VBox/HostServices/VBoxClipboardSvc.h>
 
@@ -25,4 +30,8 @@
 #include "darwin-pasteboard.h"
 
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
 /** Global clipboard context information */
 struct _VBOXCLIPBOARDCONTEXT
@@ -38,4 +47,8 @@
 };
 
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
 /** Only one client is supported. There seems to be no need for more clients. */
 static VBOXCLIPBOARDCONTEXT g_ctx;
Index: trunk/src/VBox/HostServices/SharedClipboard/service.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/service.cpp	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/service.cpp	(revision 75498)
@@ -1,5 +1,5 @@
 /* $Id$ */
 /** @file
- * Shared Clipboard: Host service entry points.
+ * Shared Clipboard Service - Host service entry points.
  */
 
@@ -70,4 +70,8 @@
  */
 
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
 #include <VBox/HostServices/VBoxClipboardSvc.h>
 #include <VBox/HostServices/VBoxClipboardExt.h>
@@ -81,42 +85,8 @@
 #include "VBoxClipboard.h"
 
-static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32)
-{
-    pParm->type = VBOX_HGCM_SVC_PARM_32BIT;
-    pParm->u.uint32 = u32;
-}
-
-static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
-{
-    if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT)
-    {
-        *pu32 = pParm->u.uint32;
-        return VINF_SUCCESS;
-    }
-
-    return VERR_INVALID_PARAMETER;
-}
-
-#if 0
-static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
-{
-    pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
-    pParm->u.pointer.size   = cb;
-    pParm->u.pointer.addr   = pv;
-}
-#endif
-
-static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
-{
-    if (pParm->type == VBOX_HGCM_SVC_PARM_PTR)
-    {
-        *ppv = pParm->u.pointer.addr;
-        *pcb = pParm->u.pointer.size;
-        return VINF_SUCCESS;
-    }
-
-    return VERR_INVALID_PARAMETER;
-}
-
+
+/*********************************************************************************************************************************
+*   Global Variables                                                                                                             *
+*********************************************************************************************************************************/
 static PVBOXHGCMSVCHELPERS g_pHelpers;
 
@@ -136,4 +106,44 @@
 /** Is the clipboard running in headless mode? */
 static bool g_fHeadless = false;
+
+
+static void VBoxHGCMParmUInt32Set (VBOXHGCMSVCPARM *pParm, uint32_t u32)
+{
+    pParm->type = VBOX_HGCM_SVC_PARM_32BIT;
+    pParm->u.uint32 = u32;
+}
+
+static int VBoxHGCMParmUInt32Get (VBOXHGCMSVCPARM *pParm, uint32_t *pu32)
+{
+    if (pParm->type == VBOX_HGCM_SVC_PARM_32BIT)
+    {
+        *pu32 = pParm->u.uint32;
+        return VINF_SUCCESS;
+    }
+
+    return VERR_INVALID_PARAMETER;
+}
+
+#if 0
+static void VBoxHGCMParmPtrSet (VBOXHGCMSVCPARM *pParm, void *pv, uint32_t cb)
+{
+    pParm->type             = VBOX_HGCM_SVC_PARM_PTR;
+    pParm->u.pointer.size   = cb;
+    pParm->u.pointer.addr   = pv;
+}
+#endif
+
+static int VBoxHGCMParmPtrGet (VBOXHGCMSVCPARM *pParm, void **ppv, uint32_t *pcb)
+{
+    if (pParm->type == VBOX_HGCM_SVC_PARM_PTR)
+    {
+        *ppv = pParm->u.pointer.addr;
+        *pcb = pParm->u.pointer.size;
+        return VINF_SUCCESS;
+    }
+
+    return VERR_INVALID_PARAMETER;
+}
+
 
 static uint32_t vboxSvcClipboardMode (void)
Index: trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp	(revision 75498)
@@ -1,6 +1,5 @@
+/* $Id$ */
 /** @file
- *
- * Shared Clipboard:
- * Linux host.
+ * Shared Clipboard Service - Linux host.
  */
 
@@ -17,8 +16,9 @@
  */
 
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
-
-#include <string.h>
-
 #include <iprt/assert.h>
 #include <iprt/critsect.h>
@@ -26,4 +26,5 @@
 #include <iprt/mem.h>
 #include <iprt/semaphore.h>
+#include <iprt/string.h>
 
 #include <VBox/GuestHost/SharedClipboard.h>
Index: trunk/src/VBox/HostServices/SharedClipboard/x11-stub.cpp
===================================================================
--- trunk/src/VBox/HostServices/SharedClipboard/x11-stub.cpp	(revision 73097)
+++ trunk/src/VBox/HostServices/SharedClipboard/x11-stub.cpp	(revision 75498)
@@ -1,6 +1,5 @@
+/* $Id$*/
 /** @file
- *
- * Shared Clipboard:
- * Linux host, a stub version with no functionality for use on headless hosts.
+ * Shared Clipboard Service - Linux host, a stub version with no functionality for use on headless hosts.
  */
 
@@ -17,4 +16,9 @@
  */
 
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
 #include <VBox/HostServices/VBoxClipboardSvc.h>
 
@@ -32,4 +36,6 @@
 
 #include "VBoxClipboard.h"
+
+
 
 /** Initialise the host side of the shared clipboard - called by the hgcm layer. */
@@ -129,2 +135,3 @@
     LogFlowFunc(("called, returning.\n"));
 }
+
