Index: trunk/include/helpers/apps.h
===================================================================
--- trunk/include/helpers/apps.h	(revision 106)
+++ trunk/include/helpers/apps.h	(revision 108)
@@ -70,4 +70,18 @@
     APIRET appFreeEnvironment(PDOSENVIRONMENT pEnv);
 
+    #ifdef INCL_WINPROGRAMLIST
+        // additional PROG_* flags for appQueryAppType
+        // #define PROG_XWP_DLL            998      // dynamic link library
+                    // removed, PROG_DLL exists already
+                    // V0.9.16 (2001-10-06)
+
+        APIRET appQueryAppType(const char *pcszExecutable,
+                                PULONG pulDosAppType,
+                                PULONG pulWinAppType);
+
+        PCSZ appDescribeAppType(PROGCATEGORY progc);
+
+        ULONG appIsWindowsApp(ULONG ulProgCategory);
+
     /* ******************************************************************
      *
@@ -76,13 +90,4 @@
      ********************************************************************/
 
-    #ifdef INCL_WINPROGRAMLIST
-        // additional PROG_* flags for appQueryAppType
-        #define PROG_XWP_DLL            998      // dynamic link library
-
-        APIRET appQueryAppType(const char *pcszExecutable,
-                                PULONG pulDosAppType,
-                                PULONG pulWinAppType);
-
-        ULONG appIsWindowsApp(ULONG ulProgCategory);
 
         PSZ appQueryDefaultWin31Environment(VOID);
Index: trunk/include/helpers/dosh.h
===================================================================
--- trunk/include/helpers/dosh.h	(revision 106)
+++ trunk/include/helpers/dosh.h	(revision 108)
@@ -836,5 +836,5 @@
     } LVMINFO, *PLVMINFO;
 
-    #define DOSH_PARTITIONS_LIMIT   10
+    /* #define DOSH_PARTITIONS_LIMIT   10
 
     #define PAR_UNUSED      0x00    // Unused
@@ -881,4 +881,5 @@
     #define PAR_FREEBSD     0xA5    // FreeBSD
     #define PAR_BBT         0xFF    // BBT
+    */
 
     // one-byte alignment
@@ -966,12 +967,13 @@
     typedef struct _PARTITIONINFO
     {
-        BYTE  bDisk;                 // drive number
-        CHAR  cLetter;               // probable drive letter or ' ' if none
-        BYTE  bFSType;               // file system type
-        CHAR  szFSType[10];          // file system name (created by us)
-        BOOL  fPrimary;              // primary partition?
-        BOOL  fBootable;             // bootable by Boot Manager?
-        CHAR  szBootName[9];         // Boot Manager name, if (fBootable)
-        ULONG ulSize;                // size MBytes
+        BYTE    bDisk;                 // drive number
+        CHAR    cLetter;               // probable drive letter or ' ' if none
+        BYTE    bFSType;               // file system type
+        PCSZ    pcszFSType;            // file system name (as returned by
+                                       // doshType2FSName, can be NULL!)
+        BOOL    fPrimary;              // primary partition?
+        BOOL    fBootable;             // bootable by Boot Manager?
+        CHAR    szBootName[9];         // Boot Manager name, if (fBootable)
+        ULONG   ulSize;                // size MBytes
         PPARTITIONINFO pNext;        // next info or NULL if last
     } PARTITIONINFO;
Index: trunk/include/helpers/prfh.h
===================================================================
--- trunk/include/helpers/prfh.h	(revision 106)
+++ trunk/include/helpers/prfh.h	(revision 108)
@@ -35,5 +35,9 @@
     #define PRFH_HEADER_INCLUDED
 
-    /* common error codes used by the prfh* functions */
+    /* ******************************************************************
+     *
+     *   Errors
+     *
+     ********************************************************************/
 
     #define PRFERR_DATASIZE     10001   // couldn't query data size for key
@@ -47,4 +51,125 @@
     #define PRFERR_INVALID_KEY  10009
     #define PRFERR_KEY_EXISTS   10010
+
+    /* ******************************************************************
+     *
+     *   Strings
+     *
+     ********************************************************************/
+
+    // DECLARE_PRFH_STRING is a handy macro which saves us from
+    // keeping two string lists in both the .h and the .c file.
+    // If this include file is included from the .c file, the
+    // string is defined as a global variable. Otherwise
+    // it is only declared as "extern" so other files can
+    // see it.
+
+    #ifdef INCLUDE_PRFH_PRIVATE
+        #define DECLARE_PRFH_STRING(str, def) const char *str = def
+    #else
+        #define DECLARE_PRFH_STRING(str, def) extern const char *str;
+    #endif
+
+    /*
+     * OS2.INI applications
+     *
+     */
+
+    // NLS settings section
+    DECLARE_PRFH_STRING(PMINIAPP_NATIONAL, "PM_National");
+
+    // system font settings section
+    DECLARE_PRFH_STRING(PMINIAPP_SYSTEMFONTS, "PM_SystemFonts");
+    DECLARE_PRFH_STRING(PMINIKEY_DEFAULTFONT, "DefaultFont");
+    DECLARE_PRFH_STRING(PMINIKEY_ICONTEXTFONT, "IconText");
+    DECLARE_PRFH_STRING(PMINIKEY_MENUSFONT, "Menus");
+
+    // installed fonts secsion
+    DECLARE_PRFH_STRING(PMINIAPP_FONTS, "PM_Fonts");
+
+    // general WPS settings
+    DECLARE_PRFH_STRING(WPINIAPP_WORKPLACE, "PM_Workplace");
+    DECLARE_PRFH_STRING(WPINIKEY_MENUBAR, "FolderMenuBar");
+
+    // abstract objects per folder handle
+    DECLARE_PRFH_STRING(WPINIAPP_FDRCONTENT, "PM_Abstract:FldrContent");
+    // all defined abstract objects on the system
+    DECLARE_PRFH_STRING(WPINIAPP_OBJECTS, "PM_Abstract:Objects");
+    // their icons, if set individually
+    DECLARE_PRFH_STRING(WPINIAPP_ICONS, "PM_Abstract:Icons");
+
+    // object ID's (<WP_DESKTOP> etc.)
+    DECLARE_PRFH_STRING(WPINIAPP_LOCATION, "PM_Workplace:Location");
+
+    // folder positions
+    DECLARE_PRFH_STRING(WPINIAPP_FOLDERPOS, "PM_Workplace:FolderPos");
+
+    // palette positions
+    DECLARE_PRFH_STRING(WPINIAPP_PALETTEPOS, "PM_Workplace:PalettePos");
+    // ???
+    DECLARE_PRFH_STRING(WPINIAPP_STATUSPOS, "PM_Workplace:StatusPos");
+    // startup folders
+    DECLARE_PRFH_STRING(WPINIAPP_STARTUP, "PM_Workplace:Startup");
+    // all the defined templates on the system
+    DECLARE_PRFH_STRING(WPINIAPP_TEMPLATES, "PM_Workplace:Templates");
+
+    // all work area folders
+    DECLARE_PRFH_STRING(WPINIAPP_WORKAREARUNNING, "FolderWorkareaRunningObjects");
+    // spooler windows ?!?
+    DECLARE_PRFH_STRING(WPINIAPP_JOBCNRPOS, "PM_PrintObject:JobCnrPos");
+
+    // associations by type ("Plain Text")
+    DECLARE_PRFH_STRING(WPINIAPP_ASSOCTYPE, "PMWP_ASSOC_TYPE");
+    // associations by filter ("*.txt")
+    DECLARE_PRFH_STRING(WPINIAPP_ASSOCFILTER, "PMWP_ASSOC_FILTER");
+    // checksums ?!?
+    DECLARE_PRFH_STRING(WPINIAPP_ASSOC_CHECKSUM, "PMWP_ASSOC_CHECKSUM");
+
+    /*
+     * OS2SYS.INI applications
+     *
+     */
+
+    DECLARE_PRFH_STRING(WPINIAPP_ACTIVEHANDLES, "PM_Workplace:ActiveHandles");
+    DECLARE_PRFH_STRING(WPINIAPP_HANDLES, "PM_Workplace:Handles");
+    DECLARE_PRFH_STRING(WPINIAPP_HANDLESAPP, "HandlesAppName");
+
+    /*
+     * some default WPS INI keys:
+     *
+     */
+
+    DECLARE_PRFH_STRING(WPOBJID_DESKTOP, "<WP_DESKTOP>");
+
+    DECLARE_PRFH_STRING(WPOBJID_KEYB, "<WP_KEYB>");
+    DECLARE_PRFH_STRING(WPOBJID_MOUSE, "<WP_MOUSE>");
+    DECLARE_PRFH_STRING(WPOBJID_CNTRY, "<WP_CNTRY>");
+    DECLARE_PRFH_STRING(WPOBJID_SOUND, "<WP_SOUND>");
+    DECLARE_PRFH_STRING(WPOBJID_SYSTEM, "<WP_SYSTEM>"); // V0.9.9
+    DECLARE_PRFH_STRING(WPOBJID_POWER, "<WP_POWER>");
+    DECLARE_PRFH_STRING(WPOBJID_WINCFG, "<WP_WINCFG>");
+
+    DECLARE_PRFH_STRING(WPOBJID_HIRESCLRPAL, "<WP_HIRESCLRPAL>");
+    DECLARE_PRFH_STRING(WPOBJID_LORESCLRPAL, "<WP_LORESCLRPAL>");
+    DECLARE_PRFH_STRING(WPOBJID_FNTPAL, "<WP_FNTPAL>");
+    DECLARE_PRFH_STRING(WPOBJID_SCHPAL96, "<WP_SCHPAL96>");
+
+    DECLARE_PRFH_STRING(WPOBJID_LAUNCHPAD, "<WP_LAUNCHPAD>");
+    DECLARE_PRFH_STRING(WPOBJID_WARPCENTER, "<WP_WARPCENTER>");
+
+    DECLARE_PRFH_STRING(WPOBJID_SPOOL, "<WP_SPOOL>");
+    DECLARE_PRFH_STRING(WPOBJID_VIEWER, "<WP_VIEWER>");
+    DECLARE_PRFH_STRING(WPOBJID_SHRED, "<WP_SHRED>");
+    DECLARE_PRFH_STRING(WPOBJID_CLOCK, "<WP_CLOCK>");
+
+    DECLARE_PRFH_STRING(WPOBJID_START, "<WP_START>");
+    DECLARE_PRFH_STRING(WPOBJID_TEMPS, "<WP_TEMPS>");
+    DECLARE_PRFH_STRING(WPOBJID_DRIVES, "<WP_DRIVES>");
+
+    /* ******************************************************************
+     *
+     *   Functions
+     *
+     ********************************************************************/
 
     APIRET prfhQueryKeysForApp(HINI hIni,
@@ -75,34 +200,4 @@
     LONG prfhQueryColor(const char *pcszKeyName, const char *pcszDefault);
 
-    /*
-     *@@ COUNTRYSETTINGS:
-     *      structure used for returning country settings
-     *      with prfhQueryCountrySettings.
-     */
-
-    typedef struct _COUNTRYSETTINGS
-    {
-        ULONG   ulDateFormat,
-                        // date format:
-                        // --  0   mm.dd.yyyy  (English)
-                        // --  1   dd.mm.yyyy  (e.g. German)
-                        // --  2   yyyy.mm.dd  (Japanese)
-                        // --  3   yyyy.dd.mm
-                ulTimeFormat;
-                        // time format:
-                        // --  0   12-hour clock
-                        // --  >0  24-hour clock
-        CHAR    cDateSep,
-                        // date separator (e.g. '/')
-                cTimeSep,
-                        // time separator (e.g. ':')
-                cDecimal,
-                        // decimal separator (e.g. '.')
-                cThousands;
-                        // thousands separator (e.g. ',')
-    } COUNTRYSETTINGS, *PCOUNTRYSETTINGS;
-
-    VOID prfhQueryCountrySettings(PCOUNTRYSETTINGS pcs);
-
     APIRET prfhCopyKey(HINI hiniSource,
                        const char *pcszSourceApp,
Index: trunk/include/helpers/stringh.h
===================================================================
--- trunk/include/helpers/stringh.h	(revision 106)
+++ trunk/include/helpers/stringh.h	(revision 108)
@@ -91,39 +91,4 @@
     ULONG strhWords(PSZ psz);
 
-    PSZ APIENTRY strhThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
-    typedef PSZ APIENTRY STRHTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands);
-    typedef STRHTHOUSANDSULONG *PSTRHTHOUSANDSULONG;
-
-    PSZ strhThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands);
-
-    PSZ strhVariableDouble(PSZ pszTarget, double dbl, PSZ pszUnits,
-                           CHAR cThousands);
-
-    VOID strhFileDate(PSZ pszBuf,
-                      FDATE *pfDate,
-                      ULONG ulDateFormat,
-                      CHAR cDateSep);
-
-    VOID strhFileTime(PSZ pszBuf,
-                      FTIME *pfTime,
-                      ULONG ulTimeFormat,
-                      CHAR cTimeSep);
-
-    VOID APIENTRY strhDateTime(PSZ pszDate,
-                               PSZ pszTime,
-                               DATETIME *pDateTime,
-                               ULONG ulDateFormat,
-                               CHAR cDateSep,
-                               ULONG ulTimeFormat,
-                               CHAR cTimeSep);
-    typedef VOID APIENTRY STRHDATETIME(PSZ pszDate,
-                               PSZ pszTime,
-                               DATETIME *pDateTime,
-                               ULONG ulDateFormat,
-                               CHAR cDateSep,
-                               ULONG ulTimeFormat,
-                               CHAR cTimeSep);
-    typedef STRHDATETIME *PSTRHDATETIME;
-
     #define STRH_BEGIN_CHARS    "\x0d\x0a "
     #define STRH_END_CHARS      "\x0d\x0a /-"
Index: trunk/include/helpers/tmsgfile.h
===================================================================
--- trunk/include/helpers/tmsgfile.h	(revision 106)
+++ trunk/include/helpers/tmsgfile.h	(revision 108)
@@ -20,5 +20,40 @@
     #define TMSGFILE_HEADER_INCLUDED
 
-    APIRET tmfGetMessage(PCHAR *pTable,
+    #ifndef XSTRING_HEADER_INCLUDED
+        #error tmsgfile.h requires xstring.h to be included first.
+    #endif
+
+    #ifndef XWPTREE_INCLUDED
+        #error tmsgfile.h requires tree.h to be included first.
+    #endif
+
+    /*
+     *@@ TMFMSGFILE:
+     *
+     *@@added V0.9.16 (2001-10-08) [umoeller]
+     */
+
+    typedef struct _TMFMSGFILE
+    {
+        PSZ     pszFilename;            // copy of .TMF file name
+
+        XSTRING strContent;             // file's full contents (converted to C LF format)
+
+        TREE    *IDsTreeRoot;           // root of tree with MSGENTRY's (a TREE* really)
+        ULONG   cIDs;                   // count of entries in the tree
+    } TMFMSGFILE, *PTMFMSGFILE;
+
+    APIRET tmfOpenMessageFile(const char *pcszMessageFile,
+                              PTMFMSGFILE *ppMsgFile);
+
+    APIRET tmfCloseMessageFile(PTMFMSGFILE *ppMsgFile);
+
+    APIRET tmfGetMessage(PTMFMSGFILE pMsgFile,
+                         PCSZ pcszMessageName,
+                         PXSTRING pstr,
+                         PSZ *pTable,
+                         ULONG cTableEntries);
+
+    /* APIRET tmfGetMessage(PCHAR *pTable,
                          ULONG cTable,
                          PBYTE pbBuffer,
@@ -35,4 +70,5 @@
                             PCSZ pszFile,
                             PULONG pcbMsg);
+       */
 
 #endif // TMSGFILE_HEADER_INCLUDED
Index: trunk/include/helpers/tree.h
===================================================================
--- trunk/include/helpers/tree.h	(revision 106)
+++ trunk/include/helpers/tree.h	(revision 108)
@@ -10,6 +10,6 @@
 #endif
 
-#ifndef SFLTREE_INCLUDED               //  Allow multiple inclusions
-    #define SFLTREE_INCLUDED
+#ifndef XWPTREE_INCLUDED               //  Allow multiple inclusions
+    #define XWPTREE_INCLUDED
 
     #if (!defined OS2_INCLUDED) && (!defined _OS2_H) && (!defined __SIMPLES_DEFINED)   // changed V0.9.0 (99-10-22) [umoeller]
Index: trunk/include/helpers/winh.h
===================================================================
--- trunk/include/helpers/winh.h	(revision 106)
+++ trunk/include/helpers/winh.h	(revision 108)
@@ -101,6 +101,6 @@
         #define WinQueryWindowPtr(a,b) winhQueryWindowPtr((a),(b))
 
-        BOOL XWPENTRY winhSetWindowText(HWND hwnd, const char *pcsz);
-        #define WinSetWindowText(a,b) winhSetWindowText((a),(b))
+        BOOL XWPENTRY winhSetWindowText2(HWND hwnd, const char *pcsz);
+        #define WinSetWindowText(a,b) winhSetWindowText2((a),(b))
 
         BOOL XWPENTRY winhSetDlgItemText(HWND hwnd, ULONG id, const char *pcsz);
@@ -758,4 +758,8 @@
     PSZ XWPENTRY winhQueryWindowText(HWND hwnd);
 
+    BOOL XWPENTRY winhSetWindowText(HWND hwnd,
+                                    const char *pcszFormat,
+                                    ...);
+
     /*
      *@@ winhQueryDlgItemText:
Index: trunk/include/helpers/wphandle.h
===================================================================
--- trunk/include/helpers/wphandle.h	(revision 106)
+++ trunk/include/helpers/wphandle.h	(revision 108)
@@ -51,103 +51,4 @@
     #define ERROR_WPH_CORRUPT_HANDLES_DATA          (ERROR_WPH_FIRST +   5)
     #define ERROR_WPH_INVALID_PARENT_HANDLE         (ERROR_WPH_FIRST +   6)
-
-    /* ******************************************************************
-     *
-     *   Strings
-     *
-     ********************************************************************/
-
-    // DECLARE_WPH_STRING is a handy macro which saves us from
-    // keeping two string lists in both the .h and the .c file.
-    // If this include file is included from the .c file, the
-    // string is defined as a global variable. Otherwise
-    // it is only declared as "extern" so other files can
-    // see it.
-
-    #ifdef INCLUDE_WPHANDLE_PRIVATE
-        #define DECLARE_WPH_STRING(str, def) const char *str = def
-    #else
-        #define DECLARE_WPH_STRING(str, def) extern const char *str;
-    #endif
-
-    /*
-     * OS2.INI applications
-     *
-     */
-
-    // abstract objects per folder handle
-    DECLARE_WPH_STRING(WPINIAPP_FDRCONTENT, "PM_Abstract:FldrContent");
-    // all defined abstract objects on the system
-    DECLARE_WPH_STRING(WPINIAPP_OBJECTS, "PM_Abstract:Objects");
-    // their icons, if set individually
-    DECLARE_WPH_STRING(WPINIAPP_ICONS, "PM_Abstract:Icons");
-
-    // object ID's (<WP_DESKTOP> etc.)
-    DECLARE_WPH_STRING(WPINIAPP_LOCATION, "PM_Workplace:Location");
-
-    // folder positions
-    DECLARE_WPH_STRING(WPINIAPP_FOLDERPOS, "PM_Workplace:FolderPos");
-
-    // palette positions
-    DECLARE_WPH_STRING(WPINIAPP_PALETTEPOS, "PM_Workplace:PalettePos");
-    // ???
-    DECLARE_WPH_STRING(WPINIAPP_STATUSPOS, "PM_Workplace:StatusPos");
-    // startup folders
-    DECLARE_WPH_STRING(WPINIAPP_STARTUP, "PM_Workplace:Startup");
-    // all the defined templates on the system
-    DECLARE_WPH_STRING(WPINIAPP_TEMPLATES, "PM_Workplace:Templates");
-
-    // all work area folders
-    DECLARE_WPH_STRING(WPINIAPP_WORKAREARUNNING, "FolderWorkareaRunningObjects");
-    // spooler windows ?!?
-    DECLARE_WPH_STRING(WPINIAPP_JOBCNRPOS, "PM_PrintObject:JobCnrPos");
-
-    // associations by type ("Plain Text")
-    DECLARE_WPH_STRING(WPINIAPP_ASSOCTYPE, "PMWP_ASSOC_TYPE");
-    // associations by filter ("*.txt")
-    DECLARE_WPH_STRING(WPINIAPP_ASSOCFILTER, "PMWP_ASSOC_FILTER");
-    // checksums ?!?
-    DECLARE_WPH_STRING(WPINIAPP_ASSOC_CHECKSUM, "PMWP_ASSOC_CHECKSUM");
-
-    /*
-     * OS2SYS.INI applications
-     *
-     */
-
-    DECLARE_WPH_STRING(WPINIAPP_ACTIVEHANDLES, "PM_Workplace:ActiveHandles");
-    DECLARE_WPH_STRING(WPINIAPP_HANDLES, "PM_Workplace:Handles");
-    DECLARE_WPH_STRING(WPINIAPP_HANDLESAPP, "HandlesAppName");
-
-    /*
-     * some default WPS INI keys:
-     *
-     */
-
-    DECLARE_WPH_STRING(WPOBJID_DESKTOP, "<WP_DESKTOP>");
-
-    DECLARE_WPH_STRING(WPOBJID_KEYB, "<WP_KEYB>");
-    DECLARE_WPH_STRING(WPOBJID_MOUSE, "<WP_MOUSE>");
-    DECLARE_WPH_STRING(WPOBJID_CNTRY, "<WP_CNTRY>");
-    DECLARE_WPH_STRING(WPOBJID_SOUND, "<WP_SOUND>");
-    DECLARE_WPH_STRING(WPOBJID_SYSTEM, "<WP_SYSTEM>"); // V0.9.9
-    DECLARE_WPH_STRING(WPOBJID_POWER, "<WP_POWER>");
-    DECLARE_WPH_STRING(WPOBJID_WINCFG, "<WP_WINCFG>");
-
-    DECLARE_WPH_STRING(WPOBJID_HIRESCLRPAL, "<WP_HIRESCLRPAL>");
-    DECLARE_WPH_STRING(WPOBJID_LORESCLRPAL, "<WP_LORESCLRPAL>");
-    DECLARE_WPH_STRING(WPOBJID_FNTPAL, "<WP_FNTPAL>");
-    DECLARE_WPH_STRING(WPOBJID_SCHPAL96, "<WP_SCHPAL96>");
-
-    DECLARE_WPH_STRING(WPOBJID_LAUNCHPAD, "<WP_LAUNCHPAD>");
-    DECLARE_WPH_STRING(WPOBJID_WARPCENTER, "<WP_WARPCENTER>");
-
-    DECLARE_WPH_STRING(WPOBJID_SPOOL, "<WP_SPOOL>");
-    DECLARE_WPH_STRING(WPOBJID_VIEWER, "<WP_VIEWER>");
-    DECLARE_WPH_STRING(WPOBJID_SHRED, "<WP_SHRED>");
-    DECLARE_WPH_STRING(WPOBJID_CLOCK, "<WP_CLOCK>");
-
-    DECLARE_WPH_STRING(WPOBJID_START, "<WP_START>");
-    DECLARE_WPH_STRING(WPOBJID_TEMPS, "<WP_TEMPS>");
-    DECLARE_WPH_STRING(WPOBJID_DRIVES, "<WP_DRIVES>");
 
     /* ******************************************************************
Index: trunk/include/helpers/xstring.h
===================================================================
--- trunk/include/helpers/xstring.h	(revision 106)
+++ trunk/include/helpers/xstring.h	(revision 108)
@@ -103,4 +103,8 @@
     typedef XSTRRESERVE *PXSTRRESERVE;
 
+    void XWPENTRY xstrShrink(PXSTRING pxstr);
+    typedef void XWPENTRY XSTRSHRINK(PXSTRING pxstr);
+    typedef XSTRSHRINK *PXSTRSHRINK;
+
     PXSTRING XWPENTRY xstrCreate(ULONG ulPreAllocate);
     typedef PXSTRING XWPENTRY XSTRCREATE(ULONG ulPreAllocate);
