Index: trunk/include/helpers/dosh.h
===================================================================
--- trunk/include/helpers/dosh.h	(revision 87)
+++ trunk/include/helpers/dosh.h	(revision 91)
@@ -158,5 +158,12 @@
         APIRET doshQueryDiskParams(ULONG ulLogicalDrive,
                                    PBIOSPARAMETERBLOCK pdp);
+
+        BOOL XWPENTRY doshIsCDROM(PBIOSPARAMETERBLOCK pdp);
+
     #endif
+
+    APIRET XWPENTRY doshHasAudioCD(ULONG ulLogicalDrive,
+                                   BOOL fMixedModeCD,
+                                   PBOOL pfAudio);
 
     VOID XWPENTRY doshEnumDrives(PSZ pszBuffer,
Index: trunk/include/helpers/gpih.h
===================================================================
--- trunk/include/helpers/gpih.h	(revision 87)
+++ trunk/include/helpers/gpih.h	(revision 91)
@@ -160,5 +160,5 @@
                                LONG lSize,
                                BOOL fFamily,
-                               PSZ pszName,
+                               const char *pcszName,
                                USHORT usFormat,
                                PFONTMETRICS pFontMetrics);
@@ -166,5 +166,5 @@
                                        LONG lSize,
                                        BOOL fFamily,
-                                       PSZ pszName,
+                                       const char *pcszName,
                                        USHORT usFormat,
                                        PFONTMETRICS pFontMetrics);
Index: trunk/include/helpers/linklist.h
===================================================================
--- trunk/include/helpers/linklist.h	(revision 87)
+++ trunk/include/helpers/linklist.h	(revision 91)
@@ -140,5 +140,5 @@
     typedef LSTINIT *PLSTINIT;
 
-    #ifdef __DEBUG_MALLOC_ENABLED__ // setup.h, helpers\memdebug.c
+    #if (defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_LIST_MALLOC)) // setup.h, helpers\memdebug.c
         PLINKLIST XWPENTRY lstCreateDebug(BOOL fItemsFreeable,
                                           const char *file,
@@ -194,5 +194,5 @@
     typedef LSTINDEXFROMITEM *PLSTINDEXFROMITEM;
 
-    #ifdef __DEBUG_MALLOC_ENABLED__ // setup.h, helpers\memdebug.c
+    #if (defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_LIST_MALLOC)) // setup.h, helpers\memdebug.c
         PLISTNODE XWPENTRY lstAppendItemDebug(PLINKLIST pList,
                                               void* pNewItemData,
Index: trunk/include/helpers/memdebug.h
===================================================================
--- trunk/include/helpers/memdebug.h	(revision 87)
+++ trunk/include/helpers/memdebug.h	(revision 91)
@@ -4,4 +4,15 @@
  *      header file for memdebug.c.
  *      See remarks there.
+ *
+ *      The following macros are used:
+ *
+ *      --  __XWPMEMDEBUG__: if defined, memory debugging is generally
+ *                           enabled. This must be set in setup.h.
+ *
+ *      --  __DEBUG_MALLOC_ENABLED__: malloc etc. have been replaced
+ *                           with memdMalloc etc. This is automatically
+ *                           defined by this header if __XWPMEMDEBUG__
+ *                           is defined, unless DONT_REPLACE_MALLOC
+ *                           is also defined.
  *
  *      Note: Version numbering in this file relates to XWorkplace version
Index: trunk/include/helpers/stringh.h
===================================================================
--- trunk/include/helpers/stringh.h	(revision 87)
+++ trunk/include/helpers/stringh.h	(revision 91)
@@ -32,5 +32,15 @@
     #define STRINGH_HEADER_INCLUDED
 
-    PSZ strhdup(const char *pszSource);
+    PSZ strhcpy(PSZ string1, const char *string2);
+
+    #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_STRINGH_MALLOC) // setup.h, helpers\memdebug.c
+        PSZ strhdupDebug(const char *pszSource,
+                         const char *pcszSourceFile,
+                         unsigned long ulLine,
+                         const char *pcszFunction);
+        #define strhdup(a) strhdupDebug((a), __FILE__, __LINE__, __FUNCTION__)
+    #else
+        PSZ strhdup(const char *pszSource);
+    #endif
 
     int strhcmp(const char *p1, const char *p2);
@@ -48,5 +58,14 @@
     BOOL strhIsDecimal(PSZ psz);
 
-    PSZ strhSubstr(const char *pBegin, const char *pEnd);
+    #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_STRINGH_MALLOC) // setup.h, helpers\memdebug.c
+        PSZ strhSubstrDebug(const char *pBegin,      // in: first char
+                            const char *pEnd,        // in: last char (not included)
+                            const char *pcszSourceFile,
+                            unsigned long ulLine,
+                            const char *pcszFunction);
+        #define strhSubstr(a, b) strhSubstrDebug((a), (b), __FILE__, __LINE__, __FUNCTION__)
+    #else
+        PSZ strhSubstr(const char *pBegin, const char *pEnd);
+    #endif
 
     PSZ strhExtract(PSZ pszBuf,
Index: trunk/include/helpers/winh.h
===================================================================
--- trunk/include/helpers/winh.h	(revision 87)
+++ trunk/include/helpers/winh.h	(revision 91)
@@ -201,4 +201,11 @@
                                       SHORT afStyle,
                                       SHORT afAttr);
+    typedef SHORT XWPENTRY WINHINSERTMENUITEM(HWND hwndMenu,
+                                              SHORT iPosition,
+                                              SHORT sItemId,
+                                              const char *pcszItemTitle,
+                                              SHORT afStyle,
+                                              SHORT afAttr);
+    typedef WINHINSERTMENUITEM *PWINHINSERTMENUITEM;
 
     HWND XWPENTRY winhInsertSubmenu(HWND hwndMenu,
@@ -211,4 +218,14 @@
                                     USHORT afItemStyle,
                                     USHORT afAttribute);
+    typedef HWND XWPENTRY WINHINSERTSUBMENU(HWND hwndMenu,
+                                            ULONG iPosition,
+                                            SHORT sMenuId,
+                                            const char *pcszSubmenuTitle,
+                                            USHORT afMenuStyle,
+                                            SHORT sItemId,
+                                            const char *pcszItemTitle,
+                                            USHORT afItemStyle,
+                                            USHORT afAttribute);
+    typedef WINHINSERTSUBMENU *PWINHINSERTSUBMENU;
 
     BOOL XWPENTRY winhSetMenuCondCascade(HWND hwndMenu,
Index: trunk/include/helpers/xstring.h
===================================================================
--- trunk/include/helpers/xstring.h	(revision 87)
+++ trunk/include/helpers/xstring.h	(revision 91)
@@ -50,9 +50,40 @@
         ULONG           ulDelta;        // allocation delta (0 = none)
                                         // V0.9.9 (2001-03-07) [umoeller]
+
+        // if memory debugging is enabled, enable the following
+        // extra fields globally... even if the caller doesn't
+        // want the replacement calls, the xstr* implementations
+        // are compiled with these fields, so they must always be
+        // present V0.9.14 (2001-08-01) [umoeller]
+        #if defined(__XWPMEMDEBUG__) // setup.h only
+            const char      *file;
+            unsigned long   line;
+            const char      *function;
+        #endif
+
     } XSTRING, *PXSTRING;
 
-    void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
+    #if defined(__DEBUG_MALLOC_ENABLED__) && !defined(DONT_REPLACE_XSTR_MALLOC) // setup.h, helpers\memdebug.c
+        #define xstrInit(a, b) xstrInitDebug((a), (b), __FILE__, __LINE__, __FUNCTION__)
+        void XWPENTRY xstrInitDebug(PXSTRING pxstr,
+                                    ULONG ulPreAllocate,
+                                    const char *file,
+                                    unsigned long line,
+                                    const char *function);
+        typedef void XWPENTRY XSTRINITDEBUG(PXSTRING pxstr,
+                                            ULONG ulPreAllocate,
+                                            const char *file,
+                                            unsigned long line,
+                                            const char *function);
+        typedef XSTRINITDEBUG *PXSTRINITDEBUG;
+    #else
+        void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
+        typedef void XWPENTRY XSTRINIT(PXSTRING pxstr, ULONG ulPreAllocate);
+        typedef XSTRINIT *PXSTRINIT;
+    #endif
+
+    /* void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
     typedef void XWPENTRY XSTRINIT(PXSTRING pxstr, ULONG ulPreAllocate);
-    typedef XSTRINIT *PXSTRINIT;
+    typedef XSTRINIT *PXSTRINIT; */
 
     void XWPENTRY xstrInitSet(PXSTRING pxstr, PSZ pszNew);
