home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / os2apipm.zip / OS2API / OS2-NLS.ADS < prev    next >
Text File  |  1995-01-23  |  4KB  |  89 lines

  1.  
  2. -- ╔═══════════════════════════════════════════════════════════════════╗
  3. -- ║       D E S I G N   E N G I N E R I N G              ║D║S║        ║
  4. -- ║            S O F T W A R E                           ╚═╩═╝        ║
  5. -- ║                                                                   ║
  6. -- ║        Package     OS2.NLS                                        ║
  7. -- ║                                                                   ║
  8. -- ║        Author :  Leonid Dulman     1995                           ║
  9. -- ║                                                                   ║
  10. -- ║             GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS            ║
  11. -- ║                                                                   ║
  12. -- ║               NLS support    of os/2 api functions                ║
  13. -- ║                                                                   ║
  14. -- ╚═══════════════════════════════════════════════════════════════════╝
  15.  
  16.  
  17. with Interfaces.C;         use Interfaces.C;
  18. with Interfaces.C.Strings; use Interfaces.C.Strings;
  19.  
  20. package Os2.Nls  is
  21. pragma Preelaborate (Nls);
  22.  
  23. --** NLS Support --
  24.  
  25. type COUNTRYCODE is record    -- ctryc --
  26.  
  27.  country      :ULONG       ;
  28.  codepage     :ULONG       ;
  29. end record;  -- COUNTRYCODE;
  30. type PCOUNTRYCODE is access all COUNTRYCODE;
  31. type USHORT_arr is array(integer range <> ) of ushort;
  32. type COUNTRYINFO  is record   -- ctryi --
  33.   country                 :ULONG       ;
  34.   codepage                :ULONG       ;
  35.   fsDateFmt               :ULONG       ;
  36.   szCurrency              :string(1..5); --[5];
  37.   szThousandsSeparator    :string(1..2); --[2];
  38.   szDecimal               :string(1..2); --[2];
  39.   szDateSeparator         :string(1..2); --[2];
  40.   szTimeSeparator         :string(1..2); --[2];
  41.   fsCurrencyFmt           :UCHAR       ;
  42.   cDecimalPlace           :UCHAR       ;
  43.   fsTimeFmt               :UCHAR       ;
  44.   abReserved1             :USHORT_arr(1..2); --2];
  45.   szDataSeparator         :string(1..2);-- [2];
  46.   abReserved2             :USHORT_arr(1..5); --[5];
  47. end record;  -- COUNTRYINFO;
  48. type  PCOUNTRYINFO is access all COUNTRYINFO ;
  49.  
  50. --    ╔════════════════════════════════════════════╗
  51. --    ║#define DosGetCtryInfo  DosQueryCtryInfo    ║
  52. --    ║#define DosGetDBCSEv    DosQueryDBCSEnv     ║
  53. --    ║#define DosCaseMap      DosMapCase          ║
  54. --    ║#define DosGetCollate   DosQueryCollate     ║
  55. --    ║#define DosGetCp        DosQueryCp          ║
  56. --    ║#define DosSetProcCp    DosSetProcessCp     ║
  57. --    ╚════════════════════════════════════════════╝
  58.  
  59. function DosQueryCtryInfo(cb       :ULONG        ;
  60.                           pcc      :PCOUNTRYCODE ;
  61.                           pci      :PCOUNTRYINFO ;
  62.                           pcbActual:PULONG       ) return apiret;
  63. pragma Import(c,DosQueryCtryInfo, Link_name=>"DosQueryCtryInfo");
  64.  
  65. function DosQueryDBCSEnv(cb  :ULONG        ;
  66.                          pcc :PCOUNTRYCODE ;
  67.                          pBuf:PCHAR        ) return apiret;
  68. pragma Import(c,DosQueryDBCSEnv, Link_name=>"DosQueryDBCSEnv");
  69.  
  70. function DosMapCase(cb :ULONG        ;
  71.                     pcc:PCOUNTRYCODE ;
  72.                     pch:PCHAR        ) return apiret;
  73. pragma Import(c,DosMapCase, Link_name=>"DosMapCase");
  74.  
  75. function  DosQueryCollate(cb  :ULONG        ;
  76.                           pcc :PCOUNTRYCODE ;
  77.                           pch :PCHAR        ;
  78.                           pcch:PULONG       ) return apiret;
  79. pragma Import(c,DosQueryCollate, Link_name=>"DosQueryCollate");
  80.  
  81. function  DosQueryCp(cb  :ULONG  ;
  82.                      arCP:PULONG ;
  83.                      pcCP:PULONG ) return apiret;
  84. pragma Import(c,DosQueryCp, Link_name=>"DosQueryCp");
  85.  
  86. function DosSetProcessCp(cp:ULONG ) return apiret;
  87. pragma Import(c,DosSetProcessCp, Link_name=>"DosSetProcessCp");
  88. end Os2.Nls;
  89.