Index: trunk/include/encodings/alltables.h
===================================================================
--- trunk/include/encodings/alltables.h	(revision 145)
+++ trunk/include/encodings/alltables.h	(revision 147)
@@ -27,4 +27,5 @@
 // #include "encodings\cp949.h"
 // #include "encodings\cp950.h"
+#include "encodings\cp1004.h"       // added V0.9.18 (2002-03-08) [umoeller]
 #include "encodings\cp1250.h"
 #include "encodings\cp1251.h"
Index: trunk/include/encodings/base.h
===================================================================
--- trunk/include/encodings/base.h	(revision 145)
+++ trunk/include/encodings/base.h	(revision 147)
@@ -16,15 +16,15 @@
     /*
      *@@ XWPENCODINGMAP:
-     *      entry in an 8-bit to Unicode conversion table.
+     *      entry in a codepage-to-Unicode conversion table.
      */
 
     typedef struct _XWPENCODINGMAP
     {
-        unsigned short      usFrom;
+        unsigned short      usCP;
         unsigned short      usUni;
     } XWPENCODINGMAP, *PXWPENCODINGMAP;
 
     /*
-     *@@ XWPENCODINGID:
+     *@@ ENCID:
      *      enum identifying each encoding set which is
      *      generally supported. Each ID corresponds to
@@ -32,6 +32,7 @@
      */
 
-    typedef enum _XWPENCODINGID
+    typedef enum _ENCID
     {
+        UNSUPPORTED,
         enc_cp437,
         enc_cp737,
@@ -54,4 +55,5 @@
         enc_cp949,
         enc_cp950,
+        enc_cp1004,     // added V0.9.18 (2002-03-08) [umoeller]
         enc_cp1250,
         enc_cp1251,
@@ -76,5 +78,52 @@
         enc_iso8859_14,
         enc_iso8859_15
-    } XWPENCODINGID;
+    } ENCID;
+
+    /*
+     *@@ CONVERSION:
+     *
+     *@@added V0.9.18 (2002-03-08) [umoeller]
+     */
+
+    typedef struct _CONVERSION
+    {
+        ENCID   EncodingID;
+
+        // to get Unicode for character 123 in the specific
+        // encoding, do pTable->ausEntriesUniFromCP[123].
+        // If you get 0xFFFF, the encoding is undefined.
+        unsigned short  usHighestCP;
+        unsigned short  *ausEntriesUniFromCP;  // usHighestCP + 1 entries
+
+        // to get codepage for unicode character 123,
+        // do pTable->ausEntriesCPFromUni[123].
+        // If you get 0xFFFF, the encoding is undefined.
+        unsigned short  usHighestUni;
+        unsigned short  *ausEntriesCPFromUni;   // usHighestUni + 1 entries
+
+    } CONVERSION, *PCONVERSION;
+
+    typedef enum _ENCBYTECOUNT
+    {
+        SINGLE,
+        DOUBLE,
+        EBCDIC,
+        MULTI_UNICODE,
+        UNKNOWN
+    } ENCBYTECOUNT;
+
+    ENCID encFindIdForCodepage(unsigned short usCodepage,
+                                       const char **ppcszDescription,
+                                       ENCBYTECOUNT *pByteCount);
+
+    PCONVERSION encCreateCodec(ENCID id);
+
+    void encFreeCodec(PCONVERSION *ppTable);
+
+    unsigned long encChar2Uni(PCONVERSION pTable,
+                              unsigned short c);
+
+    unsigned short encUni2Char(PCONVERSION pTable,
+                               unsigned long ulUni);
 
     unsigned long encDecodeUTF8(const char **ppch);
Index: trunk/include/encodings/cp1250.h
===================================================================
--- trunk/include/encodings/cp1250.h	(revision 145)
+++ trunk/include/encodings/cp1250.h	(revision 147)
@@ -3,4 +3,7 @@
  *@@sourcefile cp1250.h:
  *      encoding translation for CP1250 to Unicode.
+ *
+ *      Note: From my checking, 1250 is exactly the
+ *      same as 1004, except for character point 0xAF.
  *
  *@@added V0.9.9 (2001-02-10) [umoeller]
Index: trunk/include/encodings/cp1252.h
===================================================================
--- trunk/include/encodings/cp1252.h	(revision 145)
+++ trunk/include/encodings/cp1252.h	(revision 147)
@@ -3,4 +3,7 @@
  *@@sourcefile cp1252.h:
  *      encoding translation for CP1252 to Unicode.
+ *
+ *      Note: From my checking, 1252 is exactly the
+ *      same as 1004, except for codepoint 0xAF.
  *
  *@@added V0.9.9 (2001-02-10) [umoeller]
Index: trunk/include/helpers/cnrh.h
===================================================================
--- trunk/include/helpers/cnrh.h	(revision 145)
+++ trunk/include/helpers/cnrh.h	(revision 147)
@@ -86,5 +86,5 @@
     {
         ULONG   ulFieldOffset;
-        PSZ     pszColumnTitle;
+        PCSZ    pszColumnTitle;
         ULONG   ulDataType;
         ULONG   ulOrientation;
@@ -450,4 +450,8 @@
      *      This can only be used after BEGIN_CNRINFO().
      *
+     *      Container sort funcs must have this prototype:
+     +
+     +      SHORT EXPENTRY fnCompare(PRECORDCORE p1, PRECORDCORE p2, PVOID pStorage)
+     *
      *@@added V0.9.0
      */
Index: trunk/include/helpers/configsys.h
===================================================================
--- trunk/include/helpers/configsys.h	(revision 145)
+++ trunk/include/helpers/configsys.h	(revision 147)
@@ -66,5 +66,5 @@
                     // -- CFGRPL_REMOVEPART mode (5)
 
-        PSZ         pszUniqueSearchString2;
+        PCSZ        pszUniqueSearchString2;
                     // for UNIQUE(statement2):
                     // the "statement2" to search for
@@ -76,8 +76,8 @@
                     // 2: add before pszSearchString
                     // 3: add after pszSearchString
-        PSZ         pszVerticalSearchString;
+        PCSZ        pszVerticalSearchString;
                     // for iVertical == 2 or 3
 
-        PSZ         pszNewLine;
+        PCSZ        pszNewLine;
                     // this is a copy of stuff before the "|" char
                     // in pszConfigSys given to the constructor
Index: trunk/include/helpers/linklist.h
===================================================================
--- trunk/include/helpers/linklist.h	(revision 145)
+++ trunk/include/helpers/linklist.h	(revision 147)
@@ -95,5 +95,5 @@
     #define LINKLISTMAGIC 0xf124        // could be anything
 
-    typedef signed short _System FNSORTLIST(void*, void*, void*);
+    typedef signed short XWPENTRY FNSORTLIST(void*, void*, void*);
                             // changed V0.9.0 (99-10-22) [umoeller]
     typedef FNSORTLIST *PFNSORTLIST;
Index: trunk/include/helpers/nls.h
===================================================================
--- trunk/include/helpers/nls.h	(revision 145)
+++ trunk/include/helpers/nls.h	(revision 147)
@@ -99,4 +99,25 @@
     APIRET XWPENTRY nlsUpper(PSZ psz, ULONG ulLength);
 
+    /*
+     *@@ STRINGENTITY:
+     *
+     *@@added V0.9.16 (2001-09-29) [umoeller]
+     */
+
+    typedef struct _STRINGENTITY
+    {
+        PCSZ    pcszEntity;
+        PCSZ    *ppcszString;
+    } STRINGENTITY, *PSTRINGENTITY;
+
+    typedef const struct _STRINGENTITY *PCSTRINGENTITY;
+
+    VOID nlsInitStrings(HAB hab,
+                        HMODULE hmod,
+                        PCSTRINGENTITY paEntities,
+                        ULONG cEntities);
+
+    PCSZ nlsGetString(ULONG ulStringID);
+
 #endif
 
Index: trunk/include/helpers/stringh.h
===================================================================
--- trunk/include/helpers/stringh.h	(revision 145)
+++ trunk/include/helpers/stringh.h	(revision 147)
@@ -145,5 +145,5 @@
     ULONG XWPENTRY strhGetBlock(const char *pszSearchIn,
                                 PULONG pulSearchOffset,
-                                PSZ pszTag,
+                                const char *pszTag,
                                 PSZ *ppszBlock,
                                 PSZ *ppszAttribs,
Index: trunk/include/helpers/tmsgfile.h
===================================================================
--- trunk/include/helpers/tmsgfile.h	(revision 145)
+++ trunk/include/helpers/tmsgfile.h	(revision 147)
@@ -54,5 +54,5 @@
                          PCSZ pcszMessageName,
                          PXSTRING pstr,
-                         PSZ *pTable,
+                         PCSZ *pTable,
                          ULONG cTableEntries);
 
Index: trunk/include/helpers/winh.h
===================================================================
--- trunk/include/helpers/winh.h	(revision 145)
+++ trunk/include/helpers/winh.h	(revision 147)
@@ -652,5 +652,5 @@
 
     BOOL XWPENTRY winhAdjustControls(HWND hwndDlg,
-                                     MPARAM *pmpFlags,
+                                     const MPARAM *pmpFlags,
                                      ULONG ulCount,
                                      PSWP pswpNew,
