Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit c1b98ce8 authored by rswindell's avatar rswindell

Specified char* params as const for sbbs_t member functions:

external(), js_execfile(), and errormsg().
parent 8d87f55c
......@@ -563,7 +563,7 @@ static JSClass js_scope_class ={
JS_EnumerateStub,JS_ResolveStub,JS_ConvertStub,JS_FinalizeStub
};
long sbbs_t::js_execfile(char *cmd)
long sbbs_t::js_execfile(const char *cmd)
{
char* p;
char* args=NULL;
......
......@@ -217,10 +217,10 @@ void sbbs_t::logch(char ch, bool comma)
/* information, function, action, object and access and then attempts to */
/* write the error information into the file ERROR.LOG and NODE.LOG */
/****************************************************************************/
void sbbs_t::errormsg(int line, char *source, char action, char *object
,ulong access, char *extinfo)
void sbbs_t::errormsg(int line, const char *source, char action, const char *object
,ulong access, const char *extinfo)
{
char* src;
const char* src;
char str[2048];
char tmp[512];
char* actstr;
......
......@@ -188,7 +188,7 @@ public:
JSContext* js_cx;
JSObject* js_glob;
ulong js_loop;
long js_execfile(char *fname);
long js_execfile(const char *fname);
bool js_init(void);
void js_create_user_objects(void);
......@@ -624,7 +624,7 @@ public:
void resort(uint dirnum);
/* xtrn.cpp */
int external(char* cmdline, long mode, char* startup_dir=NULL);
int external(const char* cmdline, long mode, const char* startup_dir=NULL);
/* xtrn_sec.cpp */
int xtrn_sec(void); /* The external program section */
......@@ -645,8 +645,8 @@ public:
void errorlog(char *text); /* Logs errors to ERROR.LOG and NODE.LOG */
bool errorlog_inside;
bool errormsg_inside;
void errormsg(int line, char *file, char action, char *object
,ulong access, char *extinfo=NULL);
void errormsg(int line, const char *file, char action, const char *object
,ulong access, const char *extinfo=NULL);
/* qwk.cpp */
bool qwklogon;
......
......@@ -235,9 +235,10 @@ BYTE* cr_expand(BYTE* inbuf, ulong inlen, BYTE* outbuf, ulong& newlen)
/****************************************************************************/
/* Runs an external program */
/****************************************************************************/
int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
{
char str[MAX_PATH+1],*p,*p_startup_dir;
char str[MAX_PATH+1],*p;
const char* p_startup_dir;
char path[MAX_PATH+1];
char fname[MAX_PATH+1];
char fullcmdline[MAX_PATH+1];
......@@ -1054,7 +1055,7 @@ static int forkpty(int *amaster, char *name, termios *termp, winsize *winp)
}
#endif /* NEED_FORKPTY */
int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
{
char str[MAX_PATH+1];
char fname[MAX_PATH+1];
......@@ -1398,7 +1399,7 @@ uint fakeriobp=0xffff;
/*****************************************************************************/
/* Returns command line generated from instr with %c replacments */
/*****************************************************************************/
char * sbbs_t::cmdstr(char *instr, char *fpath, char *fspec, char *outstr)
char* sbbs_t::cmdstr(char *instr, char *fpath, char *fspec, char *outstr)
{
char str[256],*cmd;
int i,j,len;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment