Skip to content
Snippets Groups Projects
Commit d1900c79 authored by rswindell's avatar rswindell
Browse files

Created smbwrap.h for SMB-required function wrappers (sopen/lock/unlock).

Only exported function prototypes are now included in sbbs.h when included from external module (e.g. ftpsrvr.c).
parent 24809245
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
/***************/ /***************/
/* OS-specific */ /* OS-specific */
/***************/ /***************/
#ifdef _WIN32 /* Windows */ #if defined(_WIN32) /* Windows */
#include <io.h> #include <io.h>
#include <share.h> #include <share.h>
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
#include "sbbsinet.h" #include "sbbsinet.h"
#include "sbbswrap.h" #include "sbbswrap.h"
#include "smblib.h" #include "smblib.h"
#include "smbwrap.h"
#include "ars_defs.h" #include "ars_defs.h"
#include "scfgdefs.h" #include "scfgdefs.h"
#include "scfglib.h" #include "scfglib.h"
...@@ -91,22 +92,7 @@ ...@@ -91,22 +92,7 @@
#include "ringbuf.h" /* RingBuf definition */ #include "ringbuf.h" /* RingBuf definition */
#include "client.h" /* client_t definition */ #include "client.h" /* client_t definition */
/*********************/ /* Synchronet Node Instance class definition */
/* Compiler-Specific */
/*********************/
#ifndef __BORLANDC__
#ifdef __cplusplus
extern "C" {
#endif
int lock(int file, long offset, int size);
int unlock(int file, long offset, int size);
#ifdef __cplusplus
}
#endif
#endif /* !__BORLANDC__ */
#ifdef __cplusplus #ifdef __cplusplus
class sbbs_t class sbbs_t
{ {
...@@ -715,6 +701,16 @@ extern "C" { ...@@ -715,6 +701,16 @@ extern "C" {
/* str.cpp */ /* str.cpp */
DLLEXPORT BOOL DLLCALL trashcan(scfg_t* cfg, char *insearch, char *name); DLLEXPORT BOOL DLLCALL trashcan(scfg_t* cfg, char *insearch, char *name);
DLLEXPORT ushort DLLCALL crc16(char *str);
DLLEXPORT char * DLLCALL zonestr(short zone);
DLLEXPORT int DLLCALL putsmsg(scfg_t* cfg, int usernumber, char *strin);
/* load_cfg.C */
DLLEXPORT BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[]);
#ifdef SBBS /* These aren't exported */
/* misc.c */ /* misc.c */
int nopen(char *str, int access); int nopen(char *str, int access);
int bstrlen(char *str); int bstrlen(char *str);
...@@ -733,13 +729,6 @@ extern "C" { ...@@ -733,13 +729,6 @@ extern "C" {
char * hexplus(uint num, char *str); /* Hex plus for 3 digits up to 9000 */ char * hexplus(uint num, char *str); /* Hex plus for 3 digits up to 9000 */
uint hptoi(char *str); uint hptoi(char *str);
DLLEXPORT ushort DLLCALL crc16(char *str);
DLLEXPORT char * DLLCALL zonestr(short zone);
DLLEXPORT int DLLCALL putsmsg(scfg_t* cfg, int usernumber, char *strin);
/* load_cfg.C */
DLLEXPORT BOOL DLLCALL load_cfg(scfg_t* cfg, char* text[]);
char * readtext(long *line, FILE *stream); char * readtext(long *line, FILE *stream);
BOOL md(char *path); BOOL md(char *path);
...@@ -752,13 +741,9 @@ extern "C" { ...@@ -752,13 +741,9 @@ extern "C" {
char * unixtodstr(scfg_t*, time_t, char *str); /* Unix time to ASCII date */ char * unixtodstr(scfg_t*, time_t, char *str); /* Unix time to ASCII date */
char * sectostr(uint sec, char *str); /* seconds to HH:MM:SS */ char * sectostr(uint sec, char *str); /* seconds to HH:MM:SS */
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
/* qwk.cpp */ /* qwk.cpp */
void remove_re(char *str); void remove_re(char *str);
#ifdef __cplusplus
char* remove_ctrl_a(char* instr, char* outstr=NULL); char* remove_ctrl_a(char* instr, char* outstr=NULL);
#endif #endif
...@@ -774,6 +759,12 @@ BOOL filematch(char *filename, char *filespec); ...@@ -774,6 +759,12 @@ BOOL filematch(char *filename, char *filespec);
void packchatpass(char *pass, node_t* node); void packchatpass(char *pass, node_t* node);
char * unpackchatpass(char *pass, node_t* node); char * unpackchatpass(char *pass, node_t* node);
#endif /* SBBS */
#ifdef __cplusplus
}
#endif
/* Global data */ /* Global data */
extern const char* wday[]; /* abbreviated weekday names */ extern const char* wday[]; /* abbreviated weekday names */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment