home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / H / NETLIB.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  8KB  |  169 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT (C) Microsoft Corporation, 1989                                 */
  4. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  5. /*                                                                           */
  6. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  7. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  8. /*    drivers. You may use this code in accordance with the IBM License      */
  9. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  10. /*    Copyright statement may not be removed.                                */
  11. /*                                                                           */
  12. /*****************************************************************************/
  13. /*static char *SCCSID = "@(#)netlib.h    6.1 90/11/15";*/
  14. /********************************************************************/
  15. /**                   Microsoft OS|2 LAN Manager                   **/
  16. /********************************************************************/
  17.  
  18.  
  19.  
  20. /*
  21.  * Function prototypes for the functions present in netlib.
  22.  */
  23.  
  24. #ifndef API_FUNCTION
  25. #define API_FUNCTION unsigned far pascal
  26. #endif
  27.  
  28. #ifdef DBCS
  29. extern  char far    cdecl _LeadByteTable[];
  30. #define IS_LEAD_BYTE(c)     ((_LeadByteTable)[(unsigned char)(c)])
  31. #else
  32. #define IS_LEAD_BYTE(c)     0
  33. #endif
  34.  
  35. char far *      cdecl allocaf(unsigned);
  36. void            cdecl brkpt(void);
  37. unsigned short  cdecl heapalloc(unsigned short);
  38. void            cdecl initdbcs(void);
  39. int             cdecl initerrmem(void);
  40. void            cdecl logerror(char far *, unsigned short, char);
  41. void            cdecl dump_fcore(unsigned char far *, unsigned);
  42.  
  43. #if defined(OS2_INCLUDED) && defined(INCL_DOSSEMAPHORES)
  44. /* the following four function are in NET\API\UTIL */
  45. int far pascal    NetRamSemRequest(HSEM, LONG);
  46. int far pascal  NetRamSemClear(HSEM);
  47. int far pascal    NetFSRamSemRequest(PDOSFSRSEM, LONG);
  48. int far pascal    NetFSRamSemClear(PDOSFSRSEM);
  49. #else
  50. int far pascal  NetRamSemRequest(unsigned long far *, long);
  51. int far pascal  NetRamSemClear(unsigned long far *);
  52. int far pascal    NetFSRamSemRequest(struct FSRSem far *, long);
  53. int far pascal    NetFSRamSemClear(struct FSRSem far *);
  54. #endif
  55.  
  56. void            cdecl nprintf(const char *, ...);
  57. void            cdecl nfprintf(int, const char *, ...);
  58. int             cdecl nsprintf(char far *, const char *, ...);
  59. int             cdecl x_nsprintf(char far *, const char far *, ...);
  60. int             cdecl ss_eq_ds(void);
  61. int             cdecl ss_ne_ds(void);
  62. int             cdecl sbufchkf(const char far *, unsigned short);
  63.  
  64. #ifdef DBCS
  65. void       far  cdecl inidbcsf( void );
  66. char far * far  cdecl strcatf(char far *, char const far *);
  67. char far * far  cdecl strncatf(char far *, const char far *, int);
  68. char far * far  cdecl strcpyf(char far *, const char far *);
  69. char far * far  cdecl strncpyf(char far *, const char far *, int);
  70. int        far  cdecl strlenf(const char far *);
  71. int        far  cdecl strcmpf(const char far *, const char far *);
  72. int        far  cdecl stricmpf(const char far *, const char far *);
  73. int        far  cdecl strncmpf(const char far *, const char far *, int);
  74. int        far  cdecl strnicmpf(const char far *, const char far *, int);
  75. char far * far  cdecl strpbrkf(const char far *, const char far *);
  76. char far * far  cdecl strrevf(char far *);
  77. char far * far  cdecl strchrf(const char far *, char);
  78. char far * far  cdecl strrchrf(const char far *, char);
  79. int        far  cdecl strspnf(const char far *, const char far *);
  80. int        far  cdecl strcspnf(const char far *, const char far *);
  81. char far * far  cdecl strstrf(const char far *, const char far *);
  82. char far * far  cdecl stristrf(const char far *, const char far *);
  83. char far * far  cdecl struprf(char far *);
  84. char far * far  cdecl strlwrf(char far *);
  85. #ifndef NMPROT      /* net\fileserv uses a different memcpyf function thus
  86.                this      was needed */
  87. char far * far  cdecl memcpyf(char far *, const char far *, unsigned);
  88. #else
  89. char far *      cdecl memcpyf(char far *, const char far *, unsigned);
  90. #endif
  91. int        far  cdecl memcmpf(const char far *, const char far *, unsigned);
  92. char far * far  cdecl memsetf(char far *, int, unsigned);
  93. char far * far  cdecl strtokf( char far *, char far * );
  94. #else
  95. char far *      cdecl strcatf(char far *, char const far *);
  96. char far *      cdecl strncatf(char far *, const char far *, int);
  97. char far *      cdecl strcpyf(char far *, const char far *);
  98. char far *      cdecl strncpyf(char far *, const char far *, int);
  99. int             cdecl strlenf(const char far *);
  100. int             cdecl strcmpf(const char far *, const char far *);
  101. int             cdecl stricmpf(const char far *, const char far *);
  102. int             cdecl strncmpf(const char far *, const char far *, int);
  103. int             cdecl strnicmpf(const char far *, const char far *, int);
  104. char far *      cdecl strpbrkf(const char far *, const char far *);
  105. char far *      cdecl strrevf(char far *);
  106. char far *      cdecl strchrf(const char far *, char);
  107. char far *      cdecl strrchrf(const char far *, char);
  108. int             cdecl strspnf(const char far *, const char far *);
  109. int             cdecl strcspnf(const char far *, const char far *);
  110. char far *      cdecl strstrf(const char far *, const char far *);
  111. char far *      cdecl stristrf(const char far *, const char far *);
  112. char far * far  cdecl struprf(char far *);
  113. char far *      cdecl strlwrf(char far *);
  114. int             cdecl memcmpf(const char far *, const char far *, unsigned);
  115. char far *      cdecl memcpyf(char far *, const char far *, unsigned);
  116. char far *      cdecl memsetf(char far *, int, unsigned);
  117. char far *      cdecl strtokf( char far *, char far * );
  118. #endif
  119. char far *      cdecl memmovef(char far *, char far *, unsigned);
  120. int             cdecl NetPackString (char far* far*, char far*, char far* far*);
  121. char far *      cdecl nextchrf(char far *);
  122.  
  123. int             cdecl net_ctime(long far *,char far *,int,int);
  124. int             cdecl net_gmt_ctime(long far *,char far *,int,int);
  125. int             cdecl net_format_time_of_day(long far *, char far *, int);
  126. int             cdecl net_parse_time(long far *, char far *);
  127. int             cdecl nsscanf (char far *, char *, ...);
  128. /* the following two functions are in \NET\API\UTIL */
  129. API_FUNCTION    NetIMakeLMFileName(char far *, char far *, unsigned short);
  130. API_FUNCTION    NetIGetLanRoot(char far *);
  131. API_FUNCTION    NetISort (char far *, unsigned, unsigned, 
  132.               int (far * cdecl)( const void far *, const void far * ));
  133. /* the following four functions are in \NET\API\UTIL */
  134. API_FUNCTION    NetIGetMessage ( unsigned short, char far *, 
  135.                  unsigned short, unsigned short far * );
  136. API_FUNCTION    NetIGetMessage_Insert ( unsigned short, char far *, 
  137.                  unsigned short, unsigned short far *,
  138.                  char far * far *, unsigned short );
  139. unsigned far pascal GetShareUseSem(void);
  140. void far pascal     FreeShareUseSem(void);
  141.  
  142. API_FUNCTION    ClearCurDirs(void) ;
  143.  
  144. #define    NET_CTIME_FMT0_LEN    26
  145. #define NET_CTIME_FMT1_LEN    23
  146. #define NET_CTIME_FMT2_LEN    22
  147.  
  148. #define NET_FORMAT_TIME_LEN    12
  149.  
  150. #define NET_FORMAT_DURATION_LEN 12
  151.  
  152.  
  153. /** Definitions for NetIMapNCBErr() **/
  154.  
  155. /* Type definitions (stolen from OS2DEF.H) */
  156. #if ! defined(OS2_INCLUDED)
  157. typedef unsigned short USHORT;
  158. typedef unsigned char BYTE;
  159. #endif
  160.  
  161. /* The default, catch-all error return. */
  162. #define NCBERR_DEFAULT        NERR_NetworkError
  163.  
  164. /* Defined values for the error class */
  165. #define NCBERRCLASS_MESSAGE    1   /* for use by messenger and message APIs */
  166. #define NCBERRCLASS_DOMAIN    2   /* for use with domain names */
  167.  
  168. API_FUNCTION NetIMapNCBErr(USHORT usErrClass, BYTE bNCBErr) ;
  169.