|
|
1.1 ! root 1: /* smblib.h */ ! 2: ! 3: /* Synchronet message base (SMB) library function prototypes */ ! 4: ! 5: /* $Id: smblib.h,v 1.8 2000/10/30 02:23:34 rswindell Exp $ */ ! 6: ! 7: /**************************************************************************** ! 8: * @format.tab-size 4 (Plain Text/Source Code File Header) * ! 9: * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * ! 10: * * ! 11: * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * ! 12: * * ! 13: * This program is free software; you can redistribute it and/or * ! 14: * modify it under the terms of the GNU General Public License * ! 15: * as published by the Free Software Foundation; either version 2 * ! 16: * of the License, or (at your option) any later version. * ! 17: * See the GNU General Public License for more details: gpl.txt or * ! 18: * http://www.fsf.org/copyleft/gpl.html * ! 19: * * ! 20: * Anonymous FTP access to the most recent released source is available at * ! 21: * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net * ! 22: * * ! 23: * Anonymous CVS access to the development source and modification history * ! 24: * is available at cvs.synchro.net:/cvsroot/sbbs, example: * ! 25: * cvs -d :pserver:[email protected]:/cvsroot/sbbs login * ! 26: * (just hit return, no password is necessary) * ! 27: * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src * ! 28: * * ! 29: * For Synchronet coding style and modification guidelines, see * ! 30: * http://www.synchro.net/source.html * ! 31: * * ! 32: * You are encouraged to submit any modifications (preferably in Unix diff * ! 33: * format) via e-mail to [email protected] * ! 34: * * ! 35: * Note: If this box doesn't appear square, then you need to fix your tabs. * ! 36: ****************************************************************************/ ! 37: ! 38: #ifndef _SMBLIB_H ! 39: #define _SMBLIB_H ! 40: ! 41: #include "lzh.h" ! 42: ! 43: #ifdef SMBEXPORT ! 44: #undef SMBEXPORT ! 45: #endif ! 46: ! 47: #ifdef _WIN32 ! 48: #ifndef __FLAT__ ! 49: #define __FLAT__ ! 50: #endif ! 51: #ifdef __BORLANDC__ ! 52: #define SMBCALL __stdcall ! 53: #else ! 54: #define SMBCALL ! 55: #endif ! 56: #ifdef SMBDLL /* SMBLIB contained in DLL */ ! 57: #ifdef SMB_EXPORTS ! 58: #define SMBEXPORT __declspec( dllexport ) ! 59: #else ! 60: #define SMBEXPORT __declspec( dllimport ) ! 61: #endif ! 62: #else /* self-contained executable */ ! 63: #define SMBEXPORT ! 64: #endif ! 65: #elif defined __unix__ ! 66: #define SMBCALL ! 67: #define SMBEXPORT ! 68: #elif defined __FLAT__ ! 69: #define SMBCALL ! 70: #define SMBEXPORT _export ! 71: #else ! 72: #define SMBCALL ! 73: #define SMBEXPORT ! 74: #endif ! 75: ! 76: #include "smbdefs.h" ! 77: ! 78: #define SMB_STACK_LEN 4 /* Max msg bases in smb_stack() */ ! 79: #define SMB_STACK_POP 0 /* Pop a msg base off of smb_stack() */ ! 80: #define SMB_STACK_PUSH 1 /* Push a msg base onto smb_stack() */ ! 81: #define SMB_STACK_XCHNG 2 /* Exchange msg base w/last pushed */ ! 82: ! 83: #define GETMSGTXT_TAILS 1 /* Get message tail(s) too */ ! 84: ! 85: #ifdef __cplusplus ! 86: extern "C" { ! 87: #endif ! 88: ! 89: SMBEXPORT int SMBCALL smb_ver(void); ! 90: SMBEXPORT char * SMBCALL smb_lib_ver(void); ! 91: SMBEXPORT int SMBCALL smb_open(smb_t* smb); ! 92: SMBEXPORT void SMBCALL smb_close(smb_t* smb); ! 93: SMBEXPORT int SMBCALL smb_open_da(smb_t* smb); ! 94: SMBEXPORT void SMBCALL smb_close_da(smb_t* smb); ! 95: SMBEXPORT int SMBCALL smb_open_ha(smb_t* smb); ! 96: SMBEXPORT void SMBCALL smb_close_ha(smb_t* smb); ! 97: SMBEXPORT int SMBCALL smb_create(smb_t* smb); ! 98: SMBEXPORT int SMBCALL smb_stack(smb_t* smb, int op); ! 99: SMBEXPORT int SMBCALL smb_trunchdr(smb_t* smb); ! 100: SMBEXPORT int SMBCALL smb_locksmbhdr(smb_t* smb); ! 101: SMBEXPORT int SMBCALL smb_getstatus(smb_t* smb); ! 102: SMBEXPORT int SMBCALL smb_putstatus(smb_t* smb); ! 103: SMBEXPORT int SMBCALL smb_unlocksmbhdr(smb_t* smb); ! 104: SMBEXPORT int SMBCALL smb_getmsgidx(smb_t* smb, smbmsg_t* msg); ! 105: SMBEXPORT int SMBCALL smb_getlastidx(smb_t* smb, idxrec_t *idx); ! 106: SMBEXPORT uint SMBCALL smb_getmsghdrlen(smbmsg_t* msg); ! 107: SMBEXPORT ulong SMBCALL smb_getmsgdatlen(smbmsg_t* msg); ! 108: SMBEXPORT int SMBCALL smb_lockmsghdr(smb_t* smb, smbmsg_t* msg); ! 109: SMBEXPORT int SMBCALL smb_getmsghdr(smb_t* smb, smbmsg_t* msg); ! 110: SMBEXPORT int SMBCALL smb_unlockmsghdr(smb_t* smb, smbmsg_t* msg); ! 111: SMBEXPORT int SMBCALL smb_addcrc(smb_t* smb, ulong crc); ! 112: SMBEXPORT int SMBCALL smb_hfield(smbmsg_t* msg, ushort type, ushort length, void* data); ! 113: SMBEXPORT int SMBCALL smb_dfield(smbmsg_t* msg, ushort type, ulong length); ! 114: SMBEXPORT int SMBCALL smb_addmsghdr(smb_t* smb, smbmsg_t* msg,int storage); ! 115: SMBEXPORT int SMBCALL smb_putmsg(smb_t* smb, smbmsg_t* msg); ! 116: SMBEXPORT int SMBCALL smb_putmsgidx(smb_t* smb, smbmsg_t* msg); ! 117: SMBEXPORT int SMBCALL smb_putmsghdr(smb_t* smb, smbmsg_t* msg); ! 118: SMBEXPORT void SMBCALL smb_freemsgmem(smbmsg_t* msg); ! 119: SMBEXPORT ulong SMBCALL smb_hdrblocks(ulong length); ! 120: SMBEXPORT ulong SMBCALL smb_datblocks(ulong length); ! 121: SMBEXPORT long SMBCALL smb_allochdr(smb_t* smb, ulong length); ! 122: SMBEXPORT long SMBCALL smb_fallochdr(smb_t* smb, ulong length); ! 123: SMBEXPORT long SMBCALL smb_hallochdr(smb_t* smb); ! 124: SMBEXPORT long SMBCALL smb_allocdat(smb_t* smb, ulong length, ushort headers); ! 125: SMBEXPORT long SMBCALL smb_fallocdat(smb_t* smb, ulong length, ushort headers); ! 126: SMBEXPORT long SMBCALL smb_hallocdat(smb_t* smb); ! 127: SMBEXPORT int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort headers); ! 128: SMBEXPORT int SMBCALL smb_freemsg(smb_t* smb, smbmsg_t* msg); ! 129: SMBEXPORT int SMBCALL smb_freemsgdat(smb_t* smb, ulong offset, ulong length, ushort headers); ! 130: SMBEXPORT int SMBCALL smb_freemsghdr(smb_t* smb, ulong offset, ulong length); ! 131: SMBEXPORT void SMBCALL smb_freemsgtxt(char HUGE16* buf); ! 132: SMBEXPORT int SMBCALL smb_copymsgmem(smbmsg_t* destmsg, smbmsg_t* srcmsg); ! 133: SMBEXPORT char HUGE16* SMBCALL smb_getmsgtxt(smb_t* smb, smbmsg_t* msg, ulong mode); ! 134: ! 135: /* FILE pointer I/O functions */ ! 136: ! 137: SMBEXPORT int SMBCALL smb_feof(FILE* fp); ! 138: SMBEXPORT int SMBCALL smb_ferror(FILE* fp); ! 139: SMBEXPORT int SMBCALL smb_fflush(FILE* fp); ! 140: SMBEXPORT int SMBCALL smb_fgetc(FILE* fp); ! 141: SMBEXPORT int SMBCALL smb_fputc(int ch, FILE* fp); ! 142: SMBEXPORT int SMBCALL smb_fseek(FILE* fp, long offset, int whence); ! 143: SMBEXPORT long SMBCALL smb_ftell(FILE* fp); ! 144: SMBEXPORT long SMBCALL smb_fread(void HUGE16* buf, long bytes, FILE* fp); ! 145: SMBEXPORT long SMBCALL smb_fwrite(void HUGE16* buf, long bytes, FILE* fp); ! 146: SMBEXPORT long SMBCALL smb_fgetlength(FILE* fp); ! 147: SMBEXPORT int SMBCALL smb_fsetlength(FILE* fp, long length); ! 148: SMBEXPORT void SMBCALL smb_rewind(FILE* fp); ! 149: SMBEXPORT void SMBCALL smb_clearerr(FILE* fp); ! 150: ! 151: #ifdef __cplusplus ! 152: } ! 153: #endif ! 154: ! 155: #ifdef __WATCOMC__ /* Use MSC standard (prepended underscore) */ ! 156: #pragma aux smb_ver "_*" ! 157: #pragma aux smb_lib_ver "_*" ! 158: #pragma aux smb_open "_*" ! 159: #pragma aux smb_close "_*" ! 160: #pragma aux smb_open_da "_*" ! 161: #pragma aux smb_close_da "_*" ! 162: #pragma aux smb_open_ha "_*" ! 163: #pragma aux smb_close_ha "_*" ! 164: #pragma aux smb_create "_*" ! 165: #pragma aux smb_stack "_*" ! 166: #pragma aux smb_trunchdr "_*" ! 167: #pragma aux smb_locksmbhdr "_*" ! 168: #pragma aux smb_getstatus "_*" ! 169: #pragma aux smb_putstatus "_*" ! 170: #pragma aux smb_unlocksmbhdr "_*" ! 171: #pragma aux smb_getmsgidx "_*" ! 172: #pragma aux smb_getlastidx "_*" ! 173: #pragma aux smb_getmsghdrlen "_*" ! 174: #pragma aux smb_getmsgdatlen "_*" ! 175: #pragma aux smb_lockmsghdr "_*" ! 176: #pragma aux smb_getmsghdr "_*" ! 177: #pragma aux smb_unlockmsghdr "_*" ! 178: #pragma aux smb_addcrc "_*" ! 179: #pragma aux smb_hfield "_*" ! 180: #pragma aux smb_dfield "_*" ! 181: #pragma aux smb_addmsghdr "_*" ! 182: #pragma aux smb_putmsg "_*" ! 183: #pragma aux smb_putmsgidx "_*" ! 184: #pragma aux smb_putmsghdr "_*" ! 185: #pragma aux smb_freemsgmem "_*" ! 186: #pragma aux smb_hdrblocks "_*" ! 187: #pragma aux smb_datblocks "_*" ! 188: #pragma aux smb_allochdr "_*" ! 189: #pragma aux smb_fallochdr "_*" ! 190: #pragma aux smb_hallochdr "_*" ! 191: #pragma aux smb_allocdat "_*" ! 192: #pragma aux smb_fallocdat "_*" ! 193: #pragma aux smb_hallocdat "_*" ! 194: #pragma aux smb_incdat "_*" ! 195: #pragma aux smb_freemsg "_*" ! 196: #pragma aux smb_freemsgdat "_*" ! 197: #pragma aux smb_freemsghdr "_*" ! 198: #pragma aux smb_getmsgtxt "_*" ! 199: #pragma aux smb_freemsgtxt "_*" ! 200: #pragma aux smb_feof "_*" ! 201: #pragma aux smb_ferror "_*" ! 202: #pragma aux smb_fflush "_*" ! 203: #pragma aux smb_fgetc "_*" ! 204: #pragma aux smb_fputc "_*" ! 205: #pragma aux smb_fseek "_*" ! 206: #pragma aux smb_ftell "_*" ! 207: #pragma aux smb_fread "_*" ! 208: #pragma aux smb_fwrite "_*" ! 209: #pragma aux smb_fgetlength "_*" ! 210: #pragma aux smb_fsetlength "_*" ! 211: #pragma aux smb_rewind "_*" ! 212: #pragma aux smb_clearerr "_*" ! 213: #pragma aux lzh_encode "_*" ! 214: #pragma aux lzh_decode "_*" ! 215: #endif /* Watcom */ ! 216: ! 217: ! 218: #endif /* Don't add anything after this #endif statement */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.