home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Programming / MR_Classes / Dev / Source / palette / locale.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-08  |  590 b   |  34 lines

  1. #define CATCOMP_ARRAY
  2. #include "ui.h"
  3. #include "locale.h"
  4. #include <proto/locale.h>
  5. #include <proto/utility.h>
  6. //#include "ui.h"
  7.  
  8. extern struct Catalog *Catalog;
  9.  
  10. STRPTR GetString(LONG stringNum)
  11. {
  12.   struct CatCompArrayType *CCA;
  13.   STRPTR  builtIn;
  14.   ULONG entries;
  15.  
  16.   entries=sizeof(CatCompArray)/sizeof(struct CatCompArrayType);
  17.   
  18.   if(!stringNum)
  19.     return(0);
  20.  
  21.   CCA=CatCompArray;
  22.   
  23.   while (CCA->cca_ID != stringNum && entries)
  24.   {
  25.     CCA++;
  26.     entries--;
  27.   }
  28.   builtIn = CCA->cca_Str;
  29.  
  30.   if (LocaleBase)
  31.     return(GetCatalogStr(Catalog,stringNum,builtIn));
  32.   return(builtIn);
  33. }
  34.