Fixes for compiling with memwatch

This commit is contained in:
Michiel Broek 2002-05-11 11:14:35 +00:00
parent e3a8865b45
commit 741e8a077d
8 changed files with 20 additions and 20 deletions

View File

@ -85,7 +85,7 @@ libmemwatch.a: ${MEMWATCH_OBJS}
install: all
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
BASE=`pwd`; \

View File

@ -1609,7 +1609,7 @@ static int macrovalue(int nargs, char *args, char *output)
ucase(macname);
#endif
#ifdef TRACE
#ifdef DIESEL_TRACE
if (tracing) {
V printf("Eval: @(%s", macname);
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, '?', '?');
}
if (mstat != TRUE) {
#ifdef TRACE
#ifdef DIESEL_TRACE
if (tracing) {
V printf("Err: %s\n", output);
}
#endif
return DIAGNOSTIC;
}
#ifdef TRACE
#ifdef DIESEL_TRACE
if (tracing) {
V printf("===> %s\n", output);
}
@ -1645,7 +1645,7 @@ static int macrovalue(int nargs, char *args, char *output)
}
}
V sprintf(output, " @(%s)?? ", macname);
#ifdef TRACE
#ifdef DIESEL_TRACE
if (tracing) {
V printf("Err: %s\n", output);
}

View File

@ -17,7 +17,7 @@
/* Globals exported */
#ifdef TRACE
#ifdef DIESEL_TRACE
int tracing = TRUE; /* Trace macro evalution */
#endif

View File

@ -137,7 +137,8 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
if ((fi = OpenMacro("forward.tic", nodes.Language, FALSE)) != NULL) {
MacroVars("abcdfghijmns", "ssdssddsssss", TIC.TicIn.Area, tic.Comment, TIC.FileCost, fgroup.Comment,
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)
MacroVars("e", "s", TIC.RealName);
else

View File

@ -85,6 +85,8 @@ void closepage(FILE *fa, char *Name, FILE *fi)
sprintf(temp2, "%s/stat/%s.temp", CFG.www_root, Name);
rename(temp2, temp1);
chmod(temp1, 0644);
free(temp2);
free(temp1);
fa = NULL;
}

View File

@ -315,7 +315,7 @@ int AddFile(struct FILERecord fdb, int Area, char *DestPath, char *FromPath)
if ((rc = file_cp(FromPath, DestPath))) {
WriteError("Can't move file in place");
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;
}
chmod(DestPath, 0644);

View File

@ -42,8 +42,8 @@ MBCHAT_OBJS = mbchat.o
MBCHAT_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
MBSTAT_OBJS = mbstat.o
MBSTAT_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
MBTOBEREP_OBJS = mbtoberep.o
MBTOBEREP_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
MBTOBE_OBJS = mbtoberep.o
MBTOBE_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
MBUSER_OBJS = mbuser.o
MBUSER_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
OTHER = Makefile
@ -83,8 +83,8 @@ mbstat: ${MBSTAT_OBJS} ${MBSTAT_LIBS}
${CC} -o mbstat ${MBSTAT_OBJS} ${LIBS} ${MBSTAT_LIBS}
strip mbstat
mbtberep: ${MBTOBEREP_OBJS} ${MBTOBEREP_LIBS}
${CC} -o mbtoberep ${MBTOBEREP_OBJS} ${LIBS} ${MBTOBEREP_LIBS}
mbtoberep: ${MBTOBE_OBJS} ${MBTOBE_LIBS}
${CC} -o mbtoberep ${MBTOBE_OBJS} ${LIBS} ${MBTOBE_LIBS}
strip mbtoberep
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
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
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
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

View File

@ -384,22 +384,19 @@ int main(int argc, char *argv[])
int loop = 1;
struct passwd *pw;
#ifdef MEMWATCH
mwInit();
#endif
/*
* Find out who is on the keyboard or automated the keyboard.
*/
pw = getpwuid(geteuid());
if (strcmp(pw->pw_name, (char *)"mbse")) {
printf("ERROR: only user \"mbse\" may use this program\n");
#ifdef MEMWATCH
mwExit();
#endif
exit(1);
}
#ifdef MEMWATCH
mwInit();
#endif
/*
* Read the global configuration data, registrate connection
*/