home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / devcon / milan_1991 / devcon91.2 / locale / development / example / sample.c < prev    next >
C/C++ Source or Header  |  1992-09-01  |  1KB  |  50 lines

  1.  
  2. /* sample.c */
  3. #include <exec/types.h>
  4. #include <exec/libraries.h>
  5. #include <libraries/locale.h>
  6.  
  7. #include <clib/exec_protos.h>
  8. #include <clib/dos_protos.h>
  9. #include <clib/locale_protos.h>
  10.  
  11. #include <pragmas/exec_pragmas.h>
  12. #include <pragmas/dos_pragmas.h>
  13. #include <pragmas/locale_pragmas.h>
  14.  
  15. #include "texttable.h"
  16.  
  17.  
  18. /*****************************************************************************/
  19.  
  20.  
  21. extern struct Library   *DOSBase;
  22. extern struct Library   *SysBase;
  23.        struct LocaleInfo li;
  24.  
  25.  
  26. /*****************************************************************************/
  27.  
  28.  
  29. #define LocaleBase li.li_LocaleBase
  30. #define catalog    li.li_Catalog
  31.  
  32.  
  33. /*****************************************************************************/
  34.  
  35.  
  36. VOID main(VOID)
  37. {
  38.     if (LocaleBase = OpenLibrary("locale.library",38))
  39.         catalog = OpenCatalogA(NULL,"sample.catalog",NULL);
  40.  
  41.     PutStr(GetString(&li,MSG_HELLO));
  42.     PutStr(GetString(&li,MSG_BYE));
  43.  
  44.     if (LocaleBase)
  45.     {
  46.         CloseCatalog(catalog);
  47.         CloseLibrary(LocaleBase);
  48.     }
  49. }
  50.