Skip to content
Snippets Groups Projects
Commit cf992d8a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

ctrl/*.cpp no longer needs to #include sbbs.h

Just needed to move the C-exported functions from logfile.cpp into their own
header file (logfile.h) and #include-what-we-use in ctrl/*.cpp

This should reduce the Borland C++ impact on sbbs.h and any files it includes.
parent d652854f
Branches
Tags
No related merge requests found
Pipeline #8416 passed
......@@ -20,7 +20,6 @@
****************************************************************************/
//---------------------------------------------------------------------------
#include "sbbs.h"
#include <vcl.h>
#pragma hdrstop
......@@ -28,6 +27,8 @@
#include "ConfigWizardUnit.h"
#include <stdio.h> // sprintf
#include <winsock.h> // addresses and such
#include "load_cfg.h"
#include "scfgsave.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
......
......@@ -10,7 +10,6 @@
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <jpeg.hpp>
#include "sbbs.h"
//---------------------------------------------------------------------------
class TConfigWizard : public TForm
{
......
......@@ -20,7 +20,6 @@
****************************************************************************/
//---------------------------------------------------------------------------
#include "sbbs.h"
#include <vcl.h>
#include <vcl/Clipbrd.hpp>
#pragma hdrstop
......@@ -29,6 +28,8 @@
#include "MainFormUnit.h"
#include "CodeInputFormUnit.h"
#include "userdat.h"
#include "datewrap.h"
#include "trash.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
......
......@@ -20,7 +20,14 @@
****************************************************************************/
//---------------------------------------------------------------------------
#include "sbbs.h" // unixtodstr()
#include "date_str.h"
#include "getmail.h"
#include "getstats.h"
#include "load_cfg.h"
#include "logfile.h"
#include "semfile.h"
#include "sockwrap.h"
#include <mmsystem.h> // PlaySound()
#include <vcl.h>
#include <vcl/Registry.hpp> /* TRegistry */
#pragma hdrstop
......
......@@ -20,7 +20,7 @@
****************************************************************************/
//---------------------------------------------------------------------------
#include "sbbs.h"
#include "str_util.h"
#include <vcl.h>
#pragma hdrstop
#include <io.h>
......
......@@ -20,7 +20,7 @@
****************************************************************************/
//---------------------------------------------------------------------------
#include "sbbs.h"
#include "date_str.h"
#include <vcl.h>
#include <vcl/Clipbrd.hpp>
#pragma hdrstop
......
/* Synchronet log file routines (C-exported from logfile.cpp) */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* See the GNU General Public License for more details: gpl.txt or *
* http://www.fsf.org/copyleft/gpl.html *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
#ifndef LOGFILE_H_
#define LOGFILE_H_
#include "dllexport.h"
#include "mqtt.h"
#include "scfgdefs.h"
#include "sockwrap.h"
#include <stdio.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
DLLEXPORT int errorlog(scfg_t*, struct mqtt*, int level, const char* host, const char* text);
DLLEXPORT bool hacklog(scfg_t*, struct mqtt*, const char* prot, const char* user, const char* text
,const char* host, union xp_sockaddr* addr);
DLLEXPORT bool spamlog(scfg_t*, struct mqtt*, char* prot, char* action, char* reason
,char* host, char* ip_addr, char* to, char* from);
DLLEXPORT FILE* fopenlog(scfg_t*, const char* path);
DLLEXPORT size_t fwritelog(scfg_t*, void* buf, size_t size, FILE**);
DLLEXPORT void fcloselog(FILE*);
#ifdef __cplusplus
}
#endif
#endif /* Don't add anything after this line */
......@@ -291,6 +291,7 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
#include "crc32.h"
#include "telnet.h"
#include "nopen.h"
#include "logfile.h"
#include "trash.h"
#include "text.h"
#include "str_util.h"
......@@ -1404,17 +1405,6 @@ extern "C" {
DLLEXPORT int notify(scfg_t*, uint usernumber, const char* subject, const char* msg);
DLLEXPORT void normalize_msg_hfield_encoding(const char* charset, char* str, size_t size);
/* logfile.cpp */
DLLEXPORT int errorlog(scfg_t* cfg, struct mqtt*, int level, const char* host, const char* text);
DLLEXPORT bool hacklog(scfg_t* cfg, struct mqtt*, const char* prot, const char* user, const char* text
,const char* host, union xp_sockaddr* addr);
DLLEXPORT bool spamlog(scfg_t* cfg, struct mqtt*, char* prot, char* action, char* reason
,char* host, char* ip_addr, char* to, char* from);
DLLEXPORT FILE* fopenlog(scfg_t*, const char* path);
DLLEXPORT size_t fwritelog(scfg_t*, void* buf, size_t size, FILE**);
DLLEXPORT void fcloselog(FILE*);
/* data.cpp */
DLLEXPORT time_t getnextevent(scfg_t* cfg, event_t**);
DLLEXPORT time_t getnexteventtime(const event_t*);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment