home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv102.zip / INCLUDE / NL_TYPES.H < prev    next >
C/C++ Source or Header  |  1995-08-28  |  2KB  |  79 lines

  1. /** NL_TYPES.H National Language Support OS2 Include File
  2. *.
  3. *.      (C) COPYRIGHT International Business Machines Corp. 1985, 1990
  4. *.      All Rights Reserved
  5. *.      Licensed Materials - Property of IBM
  6. *.
  7. *.      US Government Users Restricted Rights - Use, duplication or
  8. *.      disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *.
  10. ** Description:
  11. *
  12. ** Notes:
  13. **/
  14.  
  15. #ifndef     _H_NL_TYPES
  16.     #define _H_NL_TYPES
  17.  
  18. #include <stdio.h>
  19.  
  20. #ifdef __cplusplus
  21.    extern "C" {
  22. #endif
  23.  
  24.   struct _header {
  25.           int             _magic;
  26.           unsigned short  _n_sets,
  27.                           _setmax;
  28.           char            _filler[20];
  29.   };
  30.   
  31.   struct _msgptr {
  32.           unsigned short  _msgno,
  33.                           _msglen;
  34.           unsigned long   _offset;
  35.   };
  36.   
  37.   
  38.   struct _catset {
  39.           unsigned short  _setno,
  40.                           _n_msgs;
  41.           struct _msgptr  *_mp;
  42.           char    **_msgtxt;
  43.   };
  44.  
  45.   struct _catalog_descriptor {
  46.           char            *_mem;
  47.           char            *_name;
  48.           FILE            *_fd;
  49.           struct _header  *_hd;
  50.           struct _catset  *_set;
  51.           int             _setmax;
  52.           int             _count;
  53.           int             _pid;
  54.           int             _oflag;
  55.   };
  56.  
  57.   typedef int nl_item;
  58.  
  59.   typedef struct _catalog_descriptor *nl_catd;
  60.  
  61.   #define NL_SETD         1
  62.   #define NL_CAT_LOCALE   1
  63.  
  64.   #define CAT_MAGIC       505
  65.   #define CATD_ERR        ((nl_catd) -1)
  66.   #define NL_MAXOPEN      10
  67.  
  68.   int catclose(nl_catd catd);
  69.   char *catgets(nl_catd catd, int set_id, int msg_id, const char *s);
  70.   nl_catd catopen(const char *name, int oflag);
  71.   
  72. #ifdef __cplusplus
  73.    }
  74. #endif
  75.  
  76.  
  77.  
  78. #endif
  79.