home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / ODCATIO.H < prev    next >
Text File  |  1997-02-28  |  4KB  |  165 lines

  1. //====START_GENERATED_PROLOG======================================
  2. //
  3. //
  4. //   COMPONENT_NAME: odtools
  5. //
  6. //   CLASSES: none
  7. //
  8. //   ORIGINS: 27
  9. //
  10. //
  11. //   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12. //   All Rights Reserved
  13. //   Licensed Materials - Property of IBM
  14. //   US Government Users Restricted Rights - Use, duplication or
  15. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //       
  17. //   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //   OR PERFORMANCE OF THIS SOFTWARE.
  24. //
  25. //====END_GENERATED_PROLOG========================================
  26. //
  27. // @(#) 1.3 %V% 9/16/96 16:24:28 [ 11/15/96 15:53:58 ]
  28.  
  29. /** catio.h National Language Support OS2 Include File
  30. *.
  31. *.      (C) COPYRIGHT International Business Machines Corp. 1995
  32. *.      All Rights Reserved
  33. *.      Licensed Materials - Property of IBM
  34. *.
  35. *.      US Government Users Restricted Rights - Use, duplication or
  36. *.      disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  37. *.
  38. **/
  39.  
  40. #ifndef __H_CATIO
  41. #define __H_CATIO
  42.  
  43.   #define  FALSE      0
  44.   #define  TRUE       1
  45.  
  46. #include <odnltyps.h>
  47. #include <errno.h>
  48. #include <stdio.h>
  49.  
  50. #define PATH_FORMAT  "\\i18n\\messages\\%L\\%N\\"
  51.  
  52. struct _message {
  53.         unsigned short  _set,
  54.                         _msg;
  55.         char           *_text;
  56.         unsigned        _old;
  57. };
  58.  
  59. struct _header {
  60.         int             _magic;
  61.         unsigned short  _n_sets,
  62.                         _setmax;
  63.         char            _filler[20];
  64. };
  65.  
  66. struct _msgptr {
  67.         unsigned short  _msgno,
  68.                         _msglen;
  69.         unsigned long   _offset;
  70. };
  71.  
  72.  
  73. struct _catset {
  74.         unsigned short  _setno,
  75.                         _n_msgs;
  76.         struct _msgptr  *_mp;
  77.         char    **_msgtxt;
  78. };
  79.  
  80. #define PATH_MAX        1023            /* max number of bytes in a pathname.
  81.                                           (not string length; doesn't include
  82.                                            a terminating null */
  83.  
  84. typedef struct _catalog_descriptor CATD;
  85.  
  86. #define  F_SETFD        2               /* Set file descriptor flags    */
  87.  
  88. /* definitions for set MS_GENCAT */
  89. #define MS_GENCAT 2
  90.  
  91. #define M_MSG_0 1
  92. #define M_MSG_1 2
  93. #define M_MSG_2 3
  94. #define M_MSG_3 4
  95. #define M_MSG_5 5
  96. #define M_MSG_7 6
  97. #define M_MSG_8 7
  98. #define M_MSG_9 8
  99. #define M_MSG_10 9
  100. #define M_MSG_11 10
  101. #define M_MSG_12 11
  102. #define M_MSG_13 12
  103. #define M_MSG_14 13
  104. #define M_MSG_15 14
  105. #define M_MSG_18 15
  106. #define M_MSG_19 16
  107. #define M_NOMSG 17
  108. #define M_ORDER 18
  109.  
  110. /* definitions for set MS_MKCATDEFS */
  111. #define MS_MKCATDEFS 3
  112.  
  113. #define MKCATUSAGE 1
  114. #define MNAMTOOLONG 2
  115. #define MKCATOPN 3
  116. #define INVTAG 4
  117. #define INVLDSET 5
  118. #define ZEROINV 6
  119. #define MULTOPN 7
  120. #define MULTNR 8
  121. #define NOTASC 9
  122. #define READERRS 10
  123. #define WRITERRS 11
  124. #define ERRFND 12
  125. #define HCREAT 13
  126. #define NOSYMB 14
  127. #define NOHDR 15
  128. #define IMBCHD 16
  129. #define IMBCTX 17
  130.  
  131. extern  int     _cat_do_open(nl_catd);
  132. extern  void    _cat_hard_close(nl_catd);
  133. extern  FILE    *_cat_openfile(char *, int);
  134.  
  135. void fcntl(int,int,int);
  136.  
  137. char *_read_msg(nl_catd catd,int setno,int msgno);  /* WPOS */
  138. char *_do_read_msg(nl_catd catd,int setno,int msgno);
  139.  
  140. nl_catd _do_open(nl_catd, int);
  141.  
  142. nl_catd NLcatopen(char *cat, int oflag);
  143.  
  144. #define ERR             (-1)
  145.  
  146. #define QTSTR           "$quote"
  147. #define SETSTR          "$set"
  148.  
  149. #define MSGMIN          0
  150. #define MSGMAX          65535
  151. #define SETMIN          1
  152. #define SETMAX          65535
  153.  
  154. #define RETURN(s)       return((errno = errno_save), s)
  155.  
  156. #define skip_to_white(s)        while (*s && *s > ' ') s++
  157. #define skip_to_nwhite(s)       while (*s && (*s == ' ' || *s == '\t')) s++
  158. #define die(s)                  puts(s), exit(1)
  159.  
  160. char *NLgetamsg(char *cat, int setno, int msgno, char* def);
  161.  
  162. #define R_OK    04              /* R_ACC readable by caller */
  163.  
  164. #endif
  165.