Fixes for compiling with memwatch
This commit is contained in:
parent
e3a8865b45
commit
741e8a077d
@ -85,7 +85,7 @@ libmemwatch.a: ${MEMWATCH_OBJS}
|
|||||||
install: all
|
install: all
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -f ${TARGET} *.o *.h~ *.c~ ftscprod.c core filelist Makefile.bak
|
rm -f ${TARGET} *.o *.h~ *.c~ ftscprod.c core filelist Makefile.bak
|
||||||
|
|
||||||
filelist: Makefile
|
filelist: Makefile
|
||||||
BASE=`pwd`; \
|
BASE=`pwd`; \
|
||||||
|
@ -1609,7 +1609,7 @@ static int macrovalue(int nargs, char *args, char *output)
|
|||||||
ucase(macname);
|
ucase(macname);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TRACE
|
#ifdef DIESEL_TRACE
|
||||||
if (tracing) {
|
if (tracing) {
|
||||||
V printf("Eval: @(%s", macname);
|
V printf("Eval: @(%s", macname);
|
||||||
for (i = 1; i < nargs; i++) {
|
for (i = 1; i < nargs; i++) {
|
||||||
@ -1629,14 +1629,14 @@ static int macrovalue(int nargs, char *args, char *output)
|
|||||||
V sprintf(output, " @(%s,%c%c) ", macname, '?', '?');
|
V sprintf(output, " @(%s,%c%c) ", macname, '?', '?');
|
||||||
}
|
}
|
||||||
if (mstat != TRUE) {
|
if (mstat != TRUE) {
|
||||||
#ifdef TRACE
|
#ifdef DIESEL_TRACE
|
||||||
if (tracing) {
|
if (tracing) {
|
||||||
V printf("Err: %s\n", output);
|
V printf("Err: %s\n", output);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return DIAGNOSTIC;
|
return DIAGNOSTIC;
|
||||||
}
|
}
|
||||||
#ifdef TRACE
|
#ifdef DIESEL_TRACE
|
||||||
if (tracing) {
|
if (tracing) {
|
||||||
V printf("===> %s\n", output);
|
V printf("===> %s\n", output);
|
||||||
}
|
}
|
||||||
@ -1645,7 +1645,7 @@ static int macrovalue(int nargs, char *args, char *output)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
V sprintf(output, " @(%s)?? ", macname);
|
V sprintf(output, " @(%s)?? ", macname);
|
||||||
#ifdef TRACE
|
#ifdef DIESEL_TRACE
|
||||||
if (tracing) {
|
if (tracing) {
|
||||||
V printf("Err: %s\n", output);
|
V printf("Err: %s\n", output);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
/* Globals exported */
|
/* Globals exported */
|
||||||
|
|
||||||
#ifdef TRACE
|
#ifdef DIESEL_TRACE
|
||||||
int tracing = TRUE; /* Trace macro evalution */
|
int tracing = TRUE; /* Trace macro evalution */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -137,7 +137,8 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
|||||||
if ((fi = OpenMacro("forward.tic", nodes.Language, FALSE)) != NULL) {
|
if ((fi = OpenMacro("forward.tic", nodes.Language, FALSE)) != NULL) {
|
||||||
MacroVars("abcdfghijmns", "ssdssddsssss", TIC.TicIn.Area, tic.Comment, TIC.FileCost, fgroup.Comment,
|
MacroVars("abcdfghijmns", "ssdssddsssss", TIC.TicIn.Area, tic.Comment, TIC.FileCost, fgroup.Comment,
|
||||||
TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024,
|
TIC.TicIn.FullName, TIC.FileSize, TIC.FileSize / 1024,
|
||||||
TIC.TicIn.Crc, TIC.TicIn.Origin, " ", TIC.TicIn.Desc, nodes.Sysop);
|
TIC.TicIn.Crc, TIC.TicIn.Origin, rfcdate(TIC.FileDate),
|
||||||
|
TIC.TicIn.Desc, nodes.Sysop);
|
||||||
if (TIC.SendOrg)
|
if (TIC.SendOrg)
|
||||||
MacroVars("e", "s", TIC.RealName);
|
MacroVars("e", "s", TIC.RealName);
|
||||||
else
|
else
|
||||||
|
@ -85,6 +85,8 @@ void closepage(FILE *fa, char *Name, FILE *fi)
|
|||||||
sprintf(temp2, "%s/stat/%s.temp", CFG.www_root, Name);
|
sprintf(temp2, "%s/stat/%s.temp", CFG.www_root, Name);
|
||||||
rename(temp2, temp1);
|
rename(temp2, temp1);
|
||||||
chmod(temp1, 0644);
|
chmod(temp1, 0644);
|
||||||
|
free(temp2);
|
||||||
|
free(temp1);
|
||||||
fa = NULL;
|
fa = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ int AddFile(struct FILERecord fdb, int Area, char *DestPath, char *FromPath)
|
|||||||
if ((rc = file_cp(FromPath, DestPath))) {
|
if ((rc = file_cp(FromPath, DestPath))) {
|
||||||
WriteError("Can't move file in place");
|
WriteError("Can't move file in place");
|
||||||
if (!do_quiet)
|
if (!do_quiet)
|
||||||
printf("Can't copy file to %s, %s\n", temp2, strerror(rc));
|
printf("Can't copy file to %s, %s\n", DestPath, strerror(rc));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
chmod(DestPath, 0644);
|
chmod(DestPath, 0644);
|
||||||
|
@ -42,8 +42,8 @@ MBCHAT_OBJS = mbchat.o
|
|||||||
MBCHAT_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBCHAT_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||||
MBSTAT_OBJS = mbstat.o
|
MBSTAT_OBJS = mbstat.o
|
||||||
MBSTAT_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBSTAT_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||||
MBTOBEREP_OBJS = mbtoberep.o
|
MBTOBE_OBJS = mbtoberep.o
|
||||||
MBTOBEREP_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBTOBE_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||||
MBUSER_OBJS = mbuser.o
|
MBUSER_OBJS = mbuser.o
|
||||||
MBUSER_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBUSER_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||||
OTHER = Makefile
|
OTHER = Makefile
|
||||||
@ -83,8 +83,8 @@ mbstat: ${MBSTAT_OBJS} ${MBSTAT_LIBS}
|
|||||||
${CC} -o mbstat ${MBSTAT_OBJS} ${LIBS} ${MBSTAT_LIBS}
|
${CC} -o mbstat ${MBSTAT_OBJS} ${LIBS} ${MBSTAT_LIBS}
|
||||||
strip mbstat
|
strip mbstat
|
||||||
|
|
||||||
mbtberep: ${MBTOBEREP_OBJS} ${MBTOBEREP_LIBS}
|
mbtoberep: ${MBTOBE_OBJS} ${MBTOBE_LIBS}
|
||||||
${CC} -o mbtoberep ${MBTOBEREP_OBJS} ${LIBS} ${MBTOBEREP_LIBS}
|
${CC} -o mbtoberep ${MBTOBE_OBJS} ${LIBS} ${MBTOBE_LIBS}
|
||||||
strip mbtoberep
|
strip mbtoberep
|
||||||
|
|
||||||
mbuser: ${MBUSER_OBJS} ${MBUSER_LIBS}
|
mbuser: ${MBUSER_OBJS} ${MBUSER_LIBS}
|
||||||
@ -137,7 +137,7 @@ depend:
|
|||||||
bank.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h bank.h input.h language.h dispfile.h timeout.h timecheck.h whoson.h exitinfo.h
|
bank.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h bank.h input.h language.h dispfile.h timeout.h timecheck.h whoson.h exitinfo.h
|
||||||
filesub.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h filesub.h funcs.h language.h input.h misc.h timeout.h exitinfo.h change.h
|
filesub.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h filesub.h funcs.h language.h input.h misc.h timeout.h exitinfo.h change.h
|
||||||
language.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h input.h language.h
|
language.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h input.h language.h
|
||||||
mbtoberep.o: ../lib/libs.h ../lib/structs.h
|
mbtoberep.o: ../lib/libs.h ../config.h ../lib/structs.h
|
||||||
msgutil.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msgtext.h ../lib/msg.h oneline.h msgutil.h
|
msgutil.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msgtext.h ../lib/msg.h oneline.h msgutil.h
|
||||||
oneline.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h oneline.h funcs.h input.h language.h
|
oneline.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h oneline.h funcs.h input.h language.h
|
||||||
bbslist.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h bbslist.h funcs.h input.h language.h
|
bbslist.o: ../lib/libs.h ../lib/mbse.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/clcomm.h ../lib/common.h bbslist.h funcs.h input.h language.h
|
||||||
|
@ -384,22 +384,19 @@ int main(int argc, char *argv[])
|
|||||||
int loop = 1;
|
int loop = 1;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
#ifdef MEMWATCH
|
|
||||||
mwInit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find out who is on the keyboard or automated the keyboard.
|
* Find out who is on the keyboard or automated the keyboard.
|
||||||
*/
|
*/
|
||||||
pw = getpwuid(geteuid());
|
pw = getpwuid(geteuid());
|
||||||
if (strcmp(pw->pw_name, (char *)"mbse")) {
|
if (strcmp(pw->pw_name, (char *)"mbse")) {
|
||||||
printf("ERROR: only user \"mbse\" may use this program\n");
|
printf("ERROR: only user \"mbse\" may use this program\n");
|
||||||
#ifdef MEMWATCH
|
|
||||||
mwExit();
|
|
||||||
#endif
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MEMWATCH
|
||||||
|
mwInit();
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the global configuration data, registrate connection
|
* Read the global configuration data, registrate connection
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user