Added macro templates for mbfile index
This commit is contained in:
parent
3e03d3bbea
commit
3b10fb8078
10
ChangeLog
10
ChangeLog
@ -4643,6 +4643,8 @@ v0.33.20 10-Feb-2002
|
|||||||
are automatic filled in.
|
are automatic filled in.
|
||||||
Splitted no TCP into no IBN, no IFC and no ITN in global and
|
Splitted no TCP into no IBN, no IFC and no ITN in global and
|
||||||
nodes setup.
|
nodes setup.
|
||||||
|
When editing a new message area, and the area was made active,
|
||||||
|
all entered data was erased.
|
||||||
|
|
||||||
mbfido:
|
mbfido:
|
||||||
In AreaMgr and FileMgr changed aka matching for area
|
In AreaMgr and FileMgr changed aka matching for area
|
||||||
@ -4704,6 +4706,11 @@ v0.33.20 10-Feb-2002
|
|||||||
When started a second time it doesn't destroy the lockfile
|
When started a second time it doesn't destroy the lockfile
|
||||||
anymore.
|
anymore.
|
||||||
|
|
||||||
|
mbfile:
|
||||||
|
The mbfile index command now creates the html pages using the
|
||||||
|
macro templates html.main and html.areas. The files.css file
|
||||||
|
is no longer needed.
|
||||||
|
|
||||||
mball:
|
mball:
|
||||||
Will not crash anymore when it needs more then 10 minutes to
|
Will not crash anymore when it needs more then 10 minutes to
|
||||||
create the allfiles and newfiles lists.
|
create the allfiles and newfiles lists.
|
||||||
@ -4792,3 +4799,6 @@ v0.33.20 10-Feb-2002
|
|||||||
installed destructive, ie. all private changes will be lost
|
installed destructive, ie. all private changes will be lost
|
||||||
with every install. Later this will be a normal install.
|
with every install. Later this will be a normal install.
|
||||||
|
|
||||||
|
rundoor.sh
|
||||||
|
Called door.bat instead of doors.bat
|
||||||
|
|
||||||
|
10
Makefile
10
Makefile
@ -7,7 +7,7 @@ OTHER = AUTHORS ChangeLog COPYING DEBUG CRON.sh FILE_ID.DIZ.in \
|
|||||||
INSTALL.in MBSE.FAQ Makefile Makefile.global.in NEWS \
|
INSTALL.in MBSE.FAQ Makefile Makefile.global.in NEWS \
|
||||||
README README.GoldED README.isdn SETUP.sh TODO UPGRADE \
|
README README.GoldED README.isdn SETUP.sh TODO UPGRADE \
|
||||||
aclocal.m4 \
|
aclocal.m4 \
|
||||||
checkbasic config.h.in configure configure.in files.css
|
checkbasic config.h.in configure configure.in
|
||||||
TARFILE = ${PACKAGE}-${VERSION}.tar.gz
|
TARFILE = ${PACKAGE}-${VERSION}.tar.gz
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -133,14 +133,6 @@ install:
|
|||||||
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/pub/local ; \
|
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/pub/local ; \
|
||||||
chmod 0755 ${PREFIX}/ftp/pub/local ; \
|
chmod 0755 ${PREFIX}/ftp/pub/local ; \
|
||||||
fi
|
fi
|
||||||
@if [ ! -d ${PREFIX}/ftp/pub/css ] ; then \
|
|
||||||
mkdir ${PREFIX}/ftp/pub/css ; \
|
|
||||||
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/ftp/pub/css ; \
|
|
||||||
chmod 0755 ${PREFIX}/ftp/pub/css ; \
|
|
||||||
fi
|
|
||||||
@if [ ! -f ${PREFIX}/ftp/pub/css/files.css ]; then \
|
|
||||||
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0444 files.css ${PREFIX}/ftp/pub/css ; \
|
|
||||||
fi
|
|
||||||
@if [ ! -d ${PREFIX}/var/bso ] ; then \
|
@if [ ! -d ${PREFIX}/var/bso ] ; then \
|
||||||
mkdir ${PREFIX}/var/nodelist ; \
|
mkdir ${PREFIX}/var/nodelist ; \
|
||||||
mkdir ${PREFIX}/var/bso ; \
|
mkdir ${PREFIX}/var/bso ; \
|
||||||
|
2
TODO
2
TODO
@ -64,8 +64,6 @@ mbcico:
|
|||||||
|
|
||||||
N: Implement MD5 crypt in binkp protocol driver.
|
N: Implement MD5 crypt in binkp protocol driver.
|
||||||
|
|
||||||
N: Remove code to make automatic calls after mbtask does this.
|
|
||||||
|
|
||||||
mbfile:
|
mbfile:
|
||||||
N: Add a check to see if the magic filenames are (still) valid.
|
N: Add a check to see if the magic filenames are (still) valid.
|
||||||
|
|
||||||
|
Binary file not shown.
@ -169,7 +169,7 @@ nntp.o: libs.h structs.h users.h records.h clcomm.h mbinet.h
|
|||||||
pop3.o: libs.h structs.h users.h records.h clcomm.h mbinet.h
|
pop3.o: libs.h structs.h users.h records.h clcomm.h mbinet.h
|
||||||
smtp.o: libs.h structs.h users.h records.h clcomm.h mbinet.h
|
smtp.o: libs.h structs.h users.h records.h clcomm.h mbinet.h
|
||||||
diesel.o: libs.h diesel.h
|
diesel.o: libs.h diesel.h
|
||||||
mbdiesel.o: libs.h structs.h users.h records.h clcomm.h diesel.h
|
mbdiesel.o: libs.h structs.h users.h records.h common.h clcomm.h diesel.h
|
||||||
memwatch.o: ../config.h ../config.h libs.h memwatch.h
|
memwatch.o: ../config.h ../config.h libs.h memwatch.h
|
||||||
ftscprod.o: libs.h structs.h common.h
|
ftscprod.o: libs.h structs.h common.h
|
||||||
# End of generated dependencies
|
# End of generated dependencies
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
#ifndef _DIESEL_H
|
#ifndef _DIESEL_H
|
||||||
#define _DIESEL_H
|
#define _DIESEL_H
|
||||||
|
|
||||||
@ -22,7 +24,7 @@ int tracing = TRUE; /* Trace macro evalution */
|
|||||||
/* Local variables. */
|
/* Local variables. */
|
||||||
|
|
||||||
#define MAXARGS 10 /* Maximum arguments to a macro */
|
#define MAXARGS 10 /* Maximum arguments to a macro */
|
||||||
#define MAXSTR 256 /* Maximum string length */
|
#define MAXSTR 2560 /* Maximum string length */
|
||||||
#define MAXDEPTH 32 /* Maximum recursion depth for eval */
|
#define MAXDEPTH 32 /* Maximum recursion depth for eval */
|
||||||
|
|
||||||
#define MACROCHAR '@' /* Macro trigger character */
|
#define MACROCHAR '@' /* Macro trigger character */
|
||||||
@ -48,7 +50,8 @@ int diesel(char *, char *);
|
|||||||
char *ParseMacro( const char *, int * );
|
char *ParseMacro( const char *, int * );
|
||||||
void MacroVars( const char *, const char *, ... );
|
void MacroVars( const char *, const char *, ... );
|
||||||
void MacroClear(void);
|
void MacroClear(void);
|
||||||
FILE *OpenMacro(const char *, int);
|
void html_massage(char *, char *);
|
||||||
|
FILE *OpenMacro(const char *, int, int);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
167
lib/mbdiesel.c
167
lib/mbdiesel.c
@ -50,8 +50,8 @@ void MacroVars( const char *codes, const char *fmt, ...)
|
|||||||
char vc;
|
char vc;
|
||||||
double vf;
|
double vf;
|
||||||
|
|
||||||
tmp1=calloc(256,sizeof(char));
|
tmp1=calloc(MAXSTR, sizeof(char));
|
||||||
tmp2=calloc(256,sizeof(char));
|
tmp2=calloc(MAXSTR, sizeof(char));
|
||||||
|
|
||||||
va_start(ap,fmt);
|
va_start(ap,fmt);
|
||||||
for ( j=0; (codes[j] != '\0') && (fmt[j] != '\0') ; j++ ){
|
for ( j=0; (codes[j] != '\0') && (fmt[j] != '\0') ; j++ ){
|
||||||
@ -103,7 +103,7 @@ void MacroClear(void)
|
|||||||
|
|
||||||
char *ParseMacro( const char *line, int *dieselrc)
|
char *ParseMacro( const char *line, int *dieselrc)
|
||||||
{
|
{
|
||||||
static char res[256];
|
static char res[MAXSTR];
|
||||||
char *tmp1, *tmp2, *tmp3, *i;
|
char *tmp1, *tmp2, *tmp3, *i;
|
||||||
int j, l;
|
int j, l;
|
||||||
char code;
|
char code;
|
||||||
@ -114,9 +114,9 @@ char *ParseMacro( const char *line, int *dieselrc)
|
|||||||
if ( *line == '#' )
|
if ( *line == '#' )
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
tmp1 = calloc(256,sizeof(char));
|
tmp1 = calloc(MAXSTR, sizeof(char));
|
||||||
tmp2 = calloc(256,sizeof(char));
|
tmp2 = calloc(MAXSTR, sizeof(char));
|
||||||
tmp3 = calloc(256,sizeof(char));
|
tmp3 = calloc(MAXSTR, sizeof(char));
|
||||||
|
|
||||||
tmp1[0]='\0';
|
tmp1[0]='\0';
|
||||||
|
|
||||||
@ -235,12 +235,139 @@ void Cookie(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE *OpenMacro(const char *filename, int Language)
|
/*
|
||||||
|
* Translate ISO 8859-1 characters to named character entities
|
||||||
|
*/
|
||||||
|
void html_massage(char *inbuf, char *outbuf)
|
||||||
|
{
|
||||||
|
char *inptr = inbuf;
|
||||||
|
char *outptr = outbuf;
|
||||||
|
|
||||||
|
memset(outbuf, 0, sizeof(outbuf));
|
||||||
|
|
||||||
|
while (*inptr) {
|
||||||
|
|
||||||
|
switch ((unsigned char)*inptr) {
|
||||||
|
|
||||||
|
case '"': sprintf(outptr, """); break;
|
||||||
|
case '&': sprintf(outptr, "&"); break;
|
||||||
|
case '<': sprintf(outptr, "<"); break;
|
||||||
|
case '>': sprintf(outptr, ">"); break;
|
||||||
|
case 160: sprintf(outptr, " "); break;
|
||||||
|
case 161: sprintf(outptr, "¡"); break;
|
||||||
|
case 162: sprintf(outptr, "¢"); break;
|
||||||
|
case 163: sprintf(outptr, "£"); break;
|
||||||
|
case 164: sprintf(outptr, "¤"); break;
|
||||||
|
case 165: sprintf(outptr, "¥"); break;
|
||||||
|
case 166: sprintf(outptr, "¦"); break;
|
||||||
|
case 167: sprintf(outptr, "§"); break;
|
||||||
|
case 168: sprintf(outptr, "¨"); break;
|
||||||
|
case 169: sprintf(outptr, "©"); break;
|
||||||
|
case 170: sprintf(outptr, "ª"); break;
|
||||||
|
case 171: sprintf(outptr, "«"); break;
|
||||||
|
case 172: sprintf(outptr, "¬"); break;
|
||||||
|
case 173: sprintf(outptr, "­"); break;
|
||||||
|
case 174: sprintf(outptr, "®"); break;
|
||||||
|
case 175: sprintf(outptr, "¯"); break;
|
||||||
|
case 176: sprintf(outptr, "°"); break;
|
||||||
|
case 177: sprintf(outptr, "&plumn;"); break;
|
||||||
|
case 178: sprintf(outptr, "²"); break;
|
||||||
|
case 179: sprintf(outptr, "³"); break;
|
||||||
|
case 180: sprintf(outptr, "´"); break;
|
||||||
|
case 181: sprintf(outptr, "µ"); break;
|
||||||
|
case 182: sprintf(outptr, "¶"); break;
|
||||||
|
case 183: sprintf(outptr, "·"); break;
|
||||||
|
case 184: sprintf(outptr, "¸"); break;
|
||||||
|
case 185: sprintf(outptr, "&supl;"); break;
|
||||||
|
case 186: sprintf(outptr, "º"); break;
|
||||||
|
case 187: sprintf(outptr, "»"); break;
|
||||||
|
case 188: sprintf(outptr, "¼"); break;
|
||||||
|
case 189: sprintf(outptr, "½"); break;
|
||||||
|
case 190: sprintf(outptr, "¾"); break;
|
||||||
|
case 191: sprintf(outptr, "¿"); break;
|
||||||
|
case 192: sprintf(outptr, "À"); break;
|
||||||
|
case 193: sprintf(outptr, "Á"); break;
|
||||||
|
case 194: sprintf(outptr, "Â"); break;
|
||||||
|
case 195: sprintf(outptr, "Ã"); break;
|
||||||
|
case 196: sprintf(outptr, "Ä"); break;
|
||||||
|
case 197: sprintf(outptr, "Å"); break;
|
||||||
|
case 198: sprintf(outptr, "Æ"); break;
|
||||||
|
case 199: sprintf(outptr, "Ç"); break;
|
||||||
|
case 200: sprintf(outptr, "È"); break;
|
||||||
|
case 201: sprintf(outptr, "É"); break;
|
||||||
|
case 202: sprintf(outptr, "Ê"); break;
|
||||||
|
case 203: sprintf(outptr, "Ë"); break;
|
||||||
|
case 204: sprintf(outptr, "Ì"); break;
|
||||||
|
case 205: sprintf(outptr, "Í"); break;
|
||||||
|
case 206: sprintf(outptr, "Î"); break;
|
||||||
|
case 207: sprintf(outptr, "Ï"); break;
|
||||||
|
case 208: sprintf(outptr, "Ð"); break;
|
||||||
|
case 209: sprintf(outptr, "Ñ"); break;
|
||||||
|
case 210: sprintf(outptr, "Ò"); break;
|
||||||
|
case 211: sprintf(outptr, "Ó"); break;
|
||||||
|
case 212: sprintf(outptr, "Ô"); break;
|
||||||
|
case 213: sprintf(outptr, "Õ"); break;
|
||||||
|
case 214: sprintf(outptr, "Ö"); break;
|
||||||
|
case 215: sprintf(outptr, "×"); break;
|
||||||
|
case 216: sprintf(outptr, "Ø"); break;
|
||||||
|
case 217: sprintf(outptr, "Ù"); break;
|
||||||
|
case 218: sprintf(outptr, "Ú"); break;
|
||||||
|
case 219: sprintf(outptr, "Û"); break;
|
||||||
|
case 220: sprintf(outptr, "Ü"); break;
|
||||||
|
case 221: sprintf(outptr, "Ý"); break;
|
||||||
|
case 222: sprintf(outptr, "Þ"); break;
|
||||||
|
case 223: sprintf(outptr, "ß"); break;
|
||||||
|
case 224: sprintf(outptr, "à"); break;
|
||||||
|
case 225: sprintf(outptr, "á"); break;
|
||||||
|
case 226: sprintf(outptr, "â"); break;
|
||||||
|
case 227: sprintf(outptr, "ã"); break;
|
||||||
|
case 228: sprintf(outptr, "ä"); break;
|
||||||
|
case 229: sprintf(outptr, "å"); break;
|
||||||
|
case 230: sprintf(outptr, "æ"); break;
|
||||||
|
case 231: sprintf(outptr, "ç"); break;
|
||||||
|
case 232: sprintf(outptr, "è"); break;
|
||||||
|
case 233: sprintf(outptr, "é"); break;
|
||||||
|
case 234: sprintf(outptr, "ê"); break;
|
||||||
|
case 235: sprintf(outptr, "ë"); break;
|
||||||
|
case 236: sprintf(outptr, "ì"); break;
|
||||||
|
case 237: sprintf(outptr, "í"); break;
|
||||||
|
case 238: sprintf(outptr, "î"); break;
|
||||||
|
case 239: sprintf(outptr, "ï"); break;
|
||||||
|
case 240: sprintf(outptr, "ð"); break;
|
||||||
|
case 241: sprintf(outptr, "ñ"); break;
|
||||||
|
case 242: sprintf(outptr, "ò"); break;
|
||||||
|
case 243: sprintf(outptr, "ó"); break;
|
||||||
|
case 244: sprintf(outptr, "ô"); break;
|
||||||
|
case 245: sprintf(outptr, "õ"); break;
|
||||||
|
case 246: sprintf(outptr, "ö"); break;
|
||||||
|
case 247: sprintf(outptr, "÷"); break;
|
||||||
|
case 248: sprintf(outptr, "ø"); break;
|
||||||
|
case 249: sprintf(outptr, "ù"); break;
|
||||||
|
case 250: sprintf(outptr, "ú"); break;
|
||||||
|
case 251: sprintf(outptr, "û"); break;
|
||||||
|
case 252: sprintf(outptr, "ü"); break;
|
||||||
|
case 253: sprintf(outptr, "ý"); break;
|
||||||
|
case 254: sprintf(outptr, "þ"); break;
|
||||||
|
case 255: sprintf(outptr, "ÿ"); break;
|
||||||
|
default: *outptr++ = *inptr; *outptr = '\0'; break;
|
||||||
|
}
|
||||||
|
while (*outptr)
|
||||||
|
outptr++;
|
||||||
|
|
||||||
|
inptr++;
|
||||||
|
}
|
||||||
|
*outptr = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FILE *OpenMacro(const char *filename, int Language, int htmlmode)
|
||||||
{
|
{
|
||||||
FILE *pLang, *fi = NULL;
|
FILE *pLang, *fi = NULL;
|
||||||
char *temp;
|
char *temp, *aka, linebuf[1024], outbuf[1024];
|
||||||
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
|
aka = calloc(81, sizeof(char));
|
||||||
temp[0] = '\0';
|
temp[0] = '\0';
|
||||||
|
|
||||||
if (Language != '\0') {
|
if (Language != '\0') {
|
||||||
@ -282,11 +409,33 @@ FILE *OpenMacro(const char *filename, int Language)
|
|||||||
else {
|
else {
|
||||||
Syslog('d', "OpenMacro(%s, %c): using %s", filename, Language, temp);
|
Syslog('d', "OpenMacro(%s, %c): using %s", filename, Language, temp);
|
||||||
sprintf(temp, "%s-%s", OsName(), OsCPU());
|
sprintf(temp, "%s-%s", OsName(), OsCPU());
|
||||||
|
if (CFG.aka[0].point)
|
||||||
|
sprintf(aka, "%d:%d/%d.%d@%s", CFG.aka[0].zone, CFG.aka[0].net, CFG.aka[0].node, CFG.aka[0].point, CFG.aka[0].domain);
|
||||||
|
else
|
||||||
|
sprintf(aka, "%d:%d/%d@%s", CFG.aka[0].zone, CFG.aka[0].net, CFG.aka[0].node, CFG.aka[0].domain);
|
||||||
|
|
||||||
|
if (htmlmode) {
|
||||||
|
MacroVars("HMOUVYZ", "ssssssd", CFG.www_url, CFG.sysdomain, temp, CFG.sysop, VERSION, aka, 0);
|
||||||
|
sprintf(linebuf, "%s", CFG.location);
|
||||||
|
html_massage(linebuf, outbuf);
|
||||||
|
MacroVars("L", "s", outbuf);
|
||||||
|
sprintf(linebuf, "%s", CFG.bbs_name);
|
||||||
|
html_massage(linebuf, outbuf);
|
||||||
|
MacroVars("N", "s", outbuf);
|
||||||
|
sprintf(linebuf, "%s", CFG.sysop_name);
|
||||||
|
html_massage(linebuf, outbuf);
|
||||||
|
MacroVars("S", "s", outbuf);
|
||||||
|
sprintf(linebuf, "%s", CFG.comment);
|
||||||
|
html_massage(linebuf, outbuf);
|
||||||
|
MacroVars("T", "s", outbuf);
|
||||||
|
} else {
|
||||||
MacroVars("HLMNOSTUVYZ", "ssssssssssd", CFG.www_url, CFG.location, CFG.sysdomain, CFG.bbs_name, temp,
|
MacroVars("HLMNOSTUVYZ", "ssssssssssd", CFG.www_url, CFG.location, CFG.sysdomain, CFG.bbs_name, temp,
|
||||||
CFG.sysop_name, CFG.comment, CFG.sysop, VERSION, aka2str(CFG.aka[0]), 0);
|
CFG.sysop_name, CFG.comment, CFG.sysop, VERSION, aka, 0);
|
||||||
|
}
|
||||||
Cookie();
|
Cookie();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(aka);
|
||||||
free(temp);
|
free(temp);
|
||||||
return fi;
|
return fi;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ MBAFF_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/l
|
|||||||
../lib/libdbase.a ../lib/libdiesel.a
|
../lib/libdbase.a ../lib/libdiesel.a
|
||||||
MBINDEX_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBINDEX_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||||
MBDIFF_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBDIFF_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
||||||
MBFILE_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a
|
MBFILE_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libdbase.a ../lib/libdiesel.a
|
||||||
MBMSG_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
MBMSG_LIBS = ../lib/libmemwatch.a ../lib/libclcomm.a ../lib/libcommon.a ../lib/libmsgbase.a ../lib/libdbase.a
|
||||||
OTHER = Makefile README maptabs.tgz paths.h.in
|
OTHER = Makefile README maptabs.tgz paths.h.in
|
||||||
TARGET = mbfido mbseq mbaff mbindex mbdiff mbfile mbmsg
|
TARGET = mbfido mbseq mbaff mbindex mbdiff mbfile mbmsg
|
||||||
@ -166,7 +166,7 @@ utic.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/co
|
|||||||
announce.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h grlist.h msgutil.h announce.h
|
announce.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h grlist.h msgutil.h announce.h
|
||||||
fflist.o: ../lib/libs.h ../lib/clcomm.h ../lib/msg.h fflist.h
|
fflist.o: ../lib/libs.h ../lib/clcomm.h ../lib/msg.h fflist.h
|
||||||
ftn2rfc.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/dbftn.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/common.h ../lib/clcomm.h rollover.h aliasdb.h postemail.h backalias.h ftn2rfc.h
|
ftn2rfc.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/dbftn.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/common.h ../lib/clcomm.h rollover.h aliasdb.h postemail.h backalias.h ftn2rfc.h
|
||||||
makestat.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h makestat.h
|
makestat.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/diesel.h makestat.h
|
||||||
mbindex.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbftn.h mbindex.h
|
mbindex.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/dbftn.h mbindex.h
|
||||||
msgutil.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h msgutil.h
|
msgutil.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h msgutil.h
|
||||||
postecho.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h
|
postecho.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h
|
||||||
@ -192,7 +192,7 @@ scannews.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../li
|
|||||||
tosspkt.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h tosspkt.h postnetmail.h postecho.h rollover.h createm.h
|
tosspkt.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/msg.h ../lib/msgtext.h ../lib/dbcfg.h ../lib/dbnode.h ../lib/dbmsgs.h ../lib/dbdupe.h ../lib/dbuser.h ../lib/dbftn.h tosspkt.h postnetmail.h postecho.h rollover.h createm.h
|
||||||
mbfkill.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfkill.h mbfutil.h
|
mbfkill.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfkill.h mbfutil.h
|
||||||
mbfutil.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfile.h
|
mbfutil.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfile.h
|
||||||
mbfindex.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfindex.h
|
mbfindex.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h ../lib/diesel.h mbfutil.h mbfindex.h
|
||||||
mbfcheck.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfcheck.h
|
mbfcheck.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfcheck.h
|
||||||
mbfpack.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfpack.h
|
mbfpack.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbfpack.h
|
||||||
mbflist.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbflist.h
|
mbflist.o: ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h ../lib/dbcfg.h mbfutil.h mbflist.h
|
||||||
|
@ -242,7 +242,7 @@ void FinishMsg(int Final, long filepos)
|
|||||||
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
|
|
||||||
if (Final && ((fi = OpenMacro(newfiles.Template, newfiles.Language)) != NULL)) {
|
if (Final && ((fi = OpenMacro(newfiles.Template, newfiles.Language, FALSE)) != NULL)) {
|
||||||
/*
|
/*
|
||||||
* Message footer
|
* Message footer
|
||||||
*/
|
*/
|
||||||
@ -298,7 +298,7 @@ long Report(gr_list *ta, long filepos)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fi = OpenMacro(newfiles.Template, newfiles.Language)) != NULL) {
|
if ((fi = OpenMacro(newfiles.Template, newfiles.Language, FALSE)) != NULL) {
|
||||||
/*
|
/*
|
||||||
* Area block header
|
* Area block header
|
||||||
*/
|
*/
|
||||||
|
@ -92,7 +92,7 @@ void A_Help(faddr *t, char *replyid)
|
|||||||
GetRpSubject("areamgr.help",subject);
|
GetRpSubject("areamgr.help",subject);
|
||||||
|
|
||||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject , replyid)) != NULL) {
|
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Areamgr", subject , replyid)) != NULL) {
|
||||||
if ((fi = OpenMacro("areamgr.help", nodes.Language)) != NULL ){
|
if ((fi = OpenMacro("areamgr.help", nodes.Language, FALSE)) != NULL ){
|
||||||
MacroVars("sAYP", "ssss", nodes.Sysop, "Areamgr", ascfnode(bestaka_s(t), 0xf), nodes.Apasswd );
|
MacroVars("sAYP", "ssss", nodes.Sysop, "Areamgr", ascfnode(bestaka_s(t), 0xf), nodes.Apasswd );
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
fclose(fi);
|
fclose(fi);
|
||||||
@ -137,22 +137,22 @@ void A_List(faddr *t, char *replyid, int Notify)
|
|||||||
case LIST_NOTIFY: Syslog('+', "AreaMgr: Notify to %s", ascfnode(t, 0xff));
|
case LIST_NOTIFY: Syslog('+', "AreaMgr: Notify to %s", ascfnode(t, 0xff));
|
||||||
sprintf(subject,"AreaMgr Notify");
|
sprintf(subject,"AreaMgr Notify");
|
||||||
GetRpSubject("areamgr.notify.list",subject);
|
GetRpSubject("areamgr.notify.list",subject);
|
||||||
fi = OpenMacro("areamgr.notify.list", nodes.Language);
|
fi = OpenMacro("areamgr.notify.list", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
case LIST_LIST: Syslog('+', "AreaMgr: List");
|
case LIST_LIST: Syslog('+', "AreaMgr: List");
|
||||||
sprintf(subject,"AreaMgr list");
|
sprintf(subject,"AreaMgr list");
|
||||||
GetRpSubject("areamgr.list",subject);
|
GetRpSubject("areamgr.list",subject);
|
||||||
fi = OpenMacro("areamgr.list", nodes.Language);
|
fi = OpenMacro("areamgr.list", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
case LIST_QUERY: Syslog('+', "AreaMgr: Query");
|
case LIST_QUERY: Syslog('+', "AreaMgr: Query");
|
||||||
sprintf(subject,"AreaMgr Query");
|
sprintf(subject,"AreaMgr Query");
|
||||||
GetRpSubject("areamgr.query",subject);
|
GetRpSubject("areamgr.query",subject);
|
||||||
fi = OpenMacro("areamgr.query", nodes.Language);
|
fi = OpenMacro("areamgr.query", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
case LIST_UNLINK: Syslog('+', "AreaMgr: Unlinked");
|
case LIST_UNLINK: Syslog('+', "AreaMgr: Unlinked");
|
||||||
sprintf(subject,"AreaMgr: Unlinked areas");
|
sprintf(subject,"AreaMgr: Unlinked areas");
|
||||||
GetRpSubject("areamgr.unlink",subject);
|
GetRpSubject("areamgr.unlink",subject);
|
||||||
fi = OpenMacro("areamgr.unlink", nodes.Language);
|
fi = OpenMacro("areamgr.unlink", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,12 +321,12 @@ void A_Flow(faddr *t, char *replyid, int Notify)
|
|||||||
Syslog('+', "AreaMgr: Flow report to %s", ascfnode(t, 0xff));
|
Syslog('+', "AreaMgr: Flow report to %s", ascfnode(t, 0xff));
|
||||||
sprintf(subject,"AreaMgr Notify Flow Report");
|
sprintf(subject,"AreaMgr Notify Flow Report");
|
||||||
GetRpSubject("areamgr.notify.flow",subject);
|
GetRpSubject("areamgr.notify.flow",subject);
|
||||||
fi = OpenMacro("areamgr.notify.flow", nodes.Language);
|
fi = OpenMacro("areamgr.notify.flow", nodes.Language, FALSE);
|
||||||
}else{
|
}else{
|
||||||
Syslog('+', "AreaMgr: Flow report");
|
Syslog('+', "AreaMgr: Flow report");
|
||||||
sprintf(subject,"AreaMgr Flow Report");
|
sprintf(subject,"AreaMgr Flow Report");
|
||||||
GetRpSubject("areamgr.flow",subject);
|
GetRpSubject("areamgr.flow",subject);
|
||||||
fi = OpenMacro("areamgr.flow", nodes.Language);
|
fi = OpenMacro("areamgr.flow", nodes.Language, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fi == 0) {
|
if (fi == 0) {
|
||||||
@ -489,7 +489,7 @@ void A_Status(faddr *t, char *replyid)
|
|||||||
);
|
);
|
||||||
GetRpSubject("areamgr.status",subject);
|
GetRpSubject("areamgr.status",subject);
|
||||||
|
|
||||||
if ((fi = OpenMacro("areamgr.status", nodes.Language)) == NULL ){
|
if ((fi = OpenMacro("areamgr.status", nodes.Language, FALSE)) == NULL ){
|
||||||
MacroClear();
|
MacroClear();
|
||||||
free(subject);
|
free(subject);
|
||||||
return;
|
return;
|
||||||
|
@ -210,7 +210,7 @@ void FinishReply(int Reported, int Total, long filepos)
|
|||||||
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
|
|
||||||
if ((fi = OpenMacro(scanmgr.template, scanmgr.Language)) != NULL) {
|
if ((fi = OpenMacro(scanmgr.template, scanmgr.Language, FALSE)) != NULL) {
|
||||||
MacroVars("CD", "dd", Reported, Total);
|
MacroVars("CD", "dd", Reported, Total);
|
||||||
fseek(fi, filepos, SEEK_SET);
|
fseek(fi, filepos, SEEK_SET);
|
||||||
Msg_Macro(fi);
|
Msg_Macro(fi);
|
||||||
@ -373,7 +373,7 @@ void ScanFiles(ff_list *tmp)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((filepos = StartReply(tmp)) != -1) && ((fi = OpenMacro(scanmgr.template, scanmgr.Language)) != NULL)) {
|
if (((filepos = StartReply(tmp)) != -1) && ((fi = OpenMacro(scanmgr.template, scanmgr.Language, FALSE)) != NULL)) {
|
||||||
areanr = 0;
|
areanr = 0;
|
||||||
|
|
||||||
sprintf(temp, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
|
||||||
|
@ -86,7 +86,7 @@ void F_Help(faddr *t, char *replyid)
|
|||||||
GetRpSubject("filemgr.help",subject);
|
GetRpSubject("filemgr.help",subject);
|
||||||
|
|
||||||
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
if ((fp = SendMgrMail(t, CFG.ct_KeepMgr, FALSE, (char *)"Filemgr", subject, replyid)) != NULL) {
|
||||||
if ((fi = OpenMacro("filemgr.help", nodes.Language)) != NULL ){
|
if ((fi = OpenMacro("filemgr.help", nodes.Language, FALSE)) != NULL ){
|
||||||
MacroVars("sAYP", "ssss", nodes.Sysop, (char *)"Filemgr", ascfnode(bestaka_s(t), 0xf), nodes.Fpasswd );
|
MacroVars("sAYP", "ssss", nodes.Sysop, (char *)"Filemgr", ascfnode(bestaka_s(t), 0xf), nodes.Fpasswd );
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
@ -128,22 +128,22 @@ void F_List(faddr *t, char *replyid, int Notify)
|
|||||||
case LIST_NOTIFY: Syslog('+', "FileMgr: Notify to %s", ascfnode(t, 0xff));
|
case LIST_NOTIFY: Syslog('+', "FileMgr: Notify to %s", ascfnode(t, 0xff));
|
||||||
sprintf(subject,"FileMgr Notify");
|
sprintf(subject,"FileMgr Notify");
|
||||||
GetRpSubject("filemgr.notify.list",subject);
|
GetRpSubject("filemgr.notify.list",subject);
|
||||||
fi=OpenMacro("filemgr.notify.list", nodes.Language);
|
fi=OpenMacro("filemgr.notify.list", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
case LIST_LIST: Syslog('+', "FileMgr: List");
|
case LIST_LIST: Syslog('+', "FileMgr: List");
|
||||||
sprintf(subject,"FileMgr list");
|
sprintf(subject,"FileMgr list");
|
||||||
GetRpSubject("filemgr.list",subject);
|
GetRpSubject("filemgr.list",subject);
|
||||||
fi=OpenMacro("filemgr.list", nodes.Language);
|
fi=OpenMacro("filemgr.list", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
case LIST_QUERY: Syslog('+', "FileMgr: Query");
|
case LIST_QUERY: Syslog('+', "FileMgr: Query");
|
||||||
sprintf(subject,"FileMgr Query");
|
sprintf(subject,"FileMgr Query");
|
||||||
GetRpSubject("filemgr.query",subject);
|
GetRpSubject("filemgr.query",subject);
|
||||||
fi=OpenMacro("filemgr.query", nodes.Language);
|
fi=OpenMacro("filemgr.query", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
default: Syslog('+', "FileMgr: Unlinked");
|
default: Syslog('+', "FileMgr: Unlinked");
|
||||||
sprintf(subject,"FileMgr: Unlinked areas");
|
sprintf(subject,"FileMgr: Unlinked areas");
|
||||||
GetRpSubject("filemgr.unlink",subject);
|
GetRpSubject("filemgr.unlink",subject);
|
||||||
fi=OpenMacro("filemgr.unlink", nodes.Language);
|
fi=OpenMacro("filemgr.unlink", nodes.Language, FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ void F_Status(faddr *t, char *replyid)
|
|||||||
);
|
);
|
||||||
GetRpSubject("filemgr.status",subject);
|
GetRpSubject("filemgr.status",subject);
|
||||||
|
|
||||||
if ((fi = OpenMacro("filemgr.status", nodes.Language)) == NULL ) {
|
if ((fi = OpenMacro("filemgr.status", nodes.Language, FALSE)) == NULL ) {
|
||||||
free(subject);
|
free(subject);
|
||||||
MacroClear();
|
MacroClear();
|
||||||
return;
|
return;
|
||||||
|
@ -135,7 +135,7 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
|
|||||||
*/
|
*/
|
||||||
if (nodes.Message) {
|
if (nodes.Message) {
|
||||||
if ((net = SendMgrMail(fido2faddr(Node), CFG.ct_KeepMgr, TRUE, (char *)"Filemgr", subject, NULL)) != NULL) {
|
if ((net = SendMgrMail(fido2faddr(Node), CFG.ct_KeepMgr, TRUE, (char *)"Filemgr", subject, NULL)) != NULL) {
|
||||||
if ((fi = OpenMacro("forward.tic", nodes.Language)) != 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, " ", TIC.TicIn.Desc, nodes.Sysop);
|
||||||
|
@ -34,135 +34,11 @@
|
|||||||
#include "../lib/records.h"
|
#include "../lib/records.h"
|
||||||
#include "../lib/common.h"
|
#include "../lib/common.h"
|
||||||
#include "../lib/clcomm.h"
|
#include "../lib/clcomm.h"
|
||||||
|
#include "../lib/diesel.h"
|
||||||
#include "makestat.h"
|
#include "makestat.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Translate ISO 8859-1 characters to named character entities
|
|
||||||
*/
|
|
||||||
void html_massage(char *, char *);
|
|
||||||
void html_massage(char *inbuf, char *outbuf)
|
|
||||||
{
|
|
||||||
char *inptr = inbuf;
|
|
||||||
char *outptr = outbuf;
|
|
||||||
|
|
||||||
memset(outbuf, 0, sizeof(outbuf));
|
|
||||||
|
|
||||||
while (*inptr) {
|
|
||||||
|
|
||||||
switch ((unsigned char)*inptr) {
|
|
||||||
case '"': sprintf(outptr, """); break;
|
|
||||||
case '&': sprintf(outptr, "&"); break;
|
|
||||||
case '<': sprintf(outptr, "<"); break;
|
|
||||||
case '>': sprintf(outptr, ">"); break;
|
|
||||||
case 160: sprintf(outptr, " "); break;
|
|
||||||
case 161: sprintf(outptr, "¡"); break;
|
|
||||||
case 162: sprintf(outptr, "¢"); break;
|
|
||||||
case 163: sprintf(outptr, "£"); break;
|
|
||||||
case 164: sprintf(outptr, "¤"); break;
|
|
||||||
case 165: sprintf(outptr, "¥"); break;
|
|
||||||
case 166: sprintf(outptr, "¦"); break;
|
|
||||||
case 167: sprintf(outptr, "§"); break;
|
|
||||||
case 168: sprintf(outptr, "¨"); break;
|
|
||||||
case 169: sprintf(outptr, "©"); break;
|
|
||||||
case 170: sprintf(outptr, "ª"); break;
|
|
||||||
case 171: sprintf(outptr, "«"); break;
|
|
||||||
case 172: sprintf(outptr, "¬"); break;
|
|
||||||
case 173: sprintf(outptr, "­"); break;
|
|
||||||
case 174: sprintf(outptr, "®"); break;
|
|
||||||
case 175: sprintf(outptr, "¯"); break;
|
|
||||||
case 176: sprintf(outptr, "°"); break;
|
|
||||||
case 177: sprintf(outptr, "&plumn;"); break;
|
|
||||||
case 178: sprintf(outptr, "²"); break;
|
|
||||||
case 179: sprintf(outptr, "³"); break;
|
|
||||||
case 180: sprintf(outptr, "´"); break;
|
|
||||||
case 181: sprintf(outptr, "µ"); break;
|
|
||||||
case 182: sprintf(outptr, "¶"); break;
|
|
||||||
case 183: sprintf(outptr, "·"); break;
|
|
||||||
case 184: sprintf(outptr, "¸"); break;
|
|
||||||
case 185: sprintf(outptr, "&supl;"); break;
|
|
||||||
case 186: sprintf(outptr, "º"); break;
|
|
||||||
case 187: sprintf(outptr, "»"); break;
|
|
||||||
case 188: sprintf(outptr, "¼"); break;
|
|
||||||
case 189: sprintf(outptr, "½"); break;
|
|
||||||
case 190: sprintf(outptr, "¾"); break;
|
|
||||||
case 191: sprintf(outptr, "¿"); break;
|
|
||||||
case 192: sprintf(outptr, "À"); break;
|
|
||||||
case 193: sprintf(outptr, "Á"); break;
|
|
||||||
case 194: sprintf(outptr, "Â"); break;
|
|
||||||
case 195: sprintf(outptr, "Ã"); break;
|
|
||||||
case 196: sprintf(outptr, "Ä"); break;
|
|
||||||
case 197: sprintf(outptr, "Å"); break;
|
|
||||||
case 198: sprintf(outptr, "Æ"); break;
|
|
||||||
case 199: sprintf(outptr, "Ç"); break;
|
|
||||||
case 200: sprintf(outptr, "È"); break;
|
|
||||||
case 201: sprintf(outptr, "É"); break;
|
|
||||||
case 202: sprintf(outptr, "Ê"); break;
|
|
||||||
case 203: sprintf(outptr, "Ë"); break;
|
|
||||||
case 204: sprintf(outptr, "Ì"); break;
|
|
||||||
case 205: sprintf(outptr, "Í"); break;
|
|
||||||
case 206: sprintf(outptr, "Î"); break;
|
|
||||||
case 207: sprintf(outptr, "Ï"); break;
|
|
||||||
case 208: sprintf(outptr, "Ð"); break;
|
|
||||||
case 209: sprintf(outptr, "Ñ"); break;
|
|
||||||
case 210: sprintf(outptr, "Ò"); break;
|
|
||||||
case 211: sprintf(outptr, "Ó"); break;
|
|
||||||
case 212: sprintf(outptr, "Ô"); break;
|
|
||||||
case 213: sprintf(outptr, "Õ"); break;
|
|
||||||
case 214: sprintf(outptr, "Ö"); break;
|
|
||||||
case 215: sprintf(outptr, "×"); break;
|
|
||||||
case 216: sprintf(outptr, "Ø"); break;
|
|
||||||
case 217: sprintf(outptr, "Ù"); break;
|
|
||||||
case 218: sprintf(outptr, "Ú"); break;
|
|
||||||
case 219: sprintf(outptr, "Û"); break;
|
|
||||||
case 220: sprintf(outptr, "Ü"); break;
|
|
||||||
case 221: sprintf(outptr, "Ý"); break;
|
|
||||||
case 222: sprintf(outptr, "Þ"); break;
|
|
||||||
case 223: sprintf(outptr, "ß"); break;
|
|
||||||
case 224: sprintf(outptr, "à"); break;
|
|
||||||
case 225: sprintf(outptr, "á"); break;
|
|
||||||
case 226: sprintf(outptr, "â"); break;
|
|
||||||
case 227: sprintf(outptr, "ã"); break;
|
|
||||||
case 228: sprintf(outptr, "ä"); break;
|
|
||||||
case 229: sprintf(outptr, "å"); break;
|
|
||||||
case 230: sprintf(outptr, "æ"); break;
|
|
||||||
case 231: sprintf(outptr, "ç"); break;
|
|
||||||
case 232: sprintf(outptr, "è"); break;
|
|
||||||
case 233: sprintf(outptr, "é"); break;
|
|
||||||
case 234: sprintf(outptr, "ê"); break;
|
|
||||||
case 235: sprintf(outptr, "ë"); break;
|
|
||||||
case 236: sprintf(outptr, "ì"); break;
|
|
||||||
case 237: sprintf(outptr, "í"); break;
|
|
||||||
case 238: sprintf(outptr, "î"); break;
|
|
||||||
case 239: sprintf(outptr, "ï"); break;
|
|
||||||
case 240: sprintf(outptr, "ð"); break;
|
|
||||||
case 241: sprintf(outptr, "ñ"); break;
|
|
||||||
case 242: sprintf(outptr, "ò"); break;
|
|
||||||
case 243: sprintf(outptr, "ó"); break;
|
|
||||||
case 244: sprintf(outptr, "ô"); break;
|
|
||||||
case 245: sprintf(outptr, "õ"); break;
|
|
||||||
case 246: sprintf(outptr, "ö"); break;
|
|
||||||
case 247: sprintf(outptr, "÷"); break;
|
|
||||||
case 248: sprintf(outptr, "ø"); break;
|
|
||||||
case 249: sprintf(outptr, "ù"); break;
|
|
||||||
case 250: sprintf(outptr, "ú"); break;
|
|
||||||
case 251: sprintf(outptr, "û"); break;
|
|
||||||
case 252: sprintf(outptr, "ü"); break;
|
|
||||||
case 253: sprintf(outptr, "ý"); break;
|
|
||||||
case 254: sprintf(outptr, "þ"); break;
|
|
||||||
case 255: sprintf(outptr, "ÿ"); break;
|
|
||||||
default: *outptr++ = *inptr; *outptr = '\0'; break;
|
|
||||||
}
|
|
||||||
while (*outptr)
|
|
||||||
outptr++;
|
|
||||||
|
|
||||||
inptr++;
|
|
||||||
}
|
|
||||||
*outptr = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE *newpage(char *, char *);
|
FILE *newpage(char *, char *);
|
||||||
FILE *newpage(char *Name, char *Title)
|
FILE *newpage(char *Name, char *Title)
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "../lib/common.h"
|
#include "../lib/common.h"
|
||||||
#include "../lib/clcomm.h"
|
#include "../lib/clcomm.h"
|
||||||
#include "../lib/dbcfg.h"
|
#include "../lib/dbcfg.h"
|
||||||
|
#include "../lib/diesel.h"
|
||||||
#include "mbfutil.h"
|
#include "mbfutil.h"
|
||||||
#include "mbfindex.h"
|
#include "mbfindex.h"
|
||||||
|
|
||||||
@ -42,6 +43,7 @@
|
|||||||
|
|
||||||
extern int do_quiet; /* Supress screen output */
|
extern int do_quiet; /* Supress screen output */
|
||||||
int lastfile; /* Last file number */
|
int lastfile; /* Last file number */
|
||||||
|
long gfilepos = 0; /* Global file position */
|
||||||
|
|
||||||
|
|
||||||
typedef struct _Index {
|
typedef struct _Index {
|
||||||
@ -131,128 +133,43 @@ int comp_index(Findex **fap1, Findex **fap2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
void MacroRead(FILE *fi, FILE *fp)
|
||||||
* Translate ISO 8859-1 characters to named character entities
|
|
||||||
*/
|
|
||||||
void html_massage(char *, char *);
|
|
||||||
void html_massage(char *inbuf, char *outbuf)
|
|
||||||
{
|
{
|
||||||
char *inptr = inbuf;
|
char *line, *temp;
|
||||||
char *outptr = outbuf;
|
int res, i;
|
||||||
|
|
||||||
memset(outbuf, 0, sizeof(outbuf));
|
line = calloc(MAXSTR, sizeof(char));
|
||||||
|
temp = calloc(MAXSTR, sizeof(char));
|
||||||
|
|
||||||
while (*inptr) {
|
while ((fgets(line, MAXSTR-2, fi) != NULL) && ((line[0]!='@') || (line[1]!='|'))) {
|
||||||
|
/*
|
||||||
switch ((unsigned char)*inptr) {
|
* Skip comment lines
|
||||||
case '"': sprintf(outptr, """); break;
|
*/
|
||||||
case '&': sprintf(outptr, "&"); break;
|
if (line[0] != '#') {
|
||||||
case '<': sprintf(outptr, "<"); break;
|
Striplf(line);
|
||||||
case '>': sprintf(outptr, ">"); break;
|
if (strlen(line) == 0) {
|
||||||
case 160: sprintf(outptr, " "); break;
|
/*
|
||||||
case 161: sprintf(outptr, "¡"); break;
|
* Empty lines are just written
|
||||||
case 162: sprintf(outptr, "¢"); break;
|
*/
|
||||||
case 163: sprintf(outptr, "£"); break;
|
fputc('\n', fp);
|
||||||
case 164: sprintf(outptr, "¤"); break;
|
} else {
|
||||||
case 165: sprintf(outptr, "¥"); break;
|
strncpy(temp, ParseMacro(line,&res), MAXSTR-1);
|
||||||
case 166: sprintf(outptr, "¦"); break;
|
if (res)
|
||||||
case 167: sprintf(outptr, "§"); break;
|
Syslog('!', "Macro error line: \"%s\"", line);
|
||||||
case 168: sprintf(outptr, "¨"); break;
|
/*
|
||||||
case 169: sprintf(outptr, "©"); break;
|
* Only output if something was evaluated
|
||||||
case 170: sprintf(outptr, "ª"); break;
|
*/
|
||||||
case 171: sprintf(outptr, "«"); break;
|
if (strlen(temp)) {
|
||||||
case 172: sprintf(outptr, "¬"); break;
|
for (i = 0; i < strlen(temp); i++)
|
||||||
case 173: sprintf(outptr, "­"); break;
|
fputc(temp[i], fp);
|
||||||
case 174: sprintf(outptr, "®"); break;
|
fputc('\n', fp);
|
||||||
case 175: sprintf(outptr, "¯"); break;
|
|
||||||
case 176: sprintf(outptr, "°"); break;
|
|
||||||
case 177: sprintf(outptr, "&plumn;"); break;
|
|
||||||
case 178: sprintf(outptr, "²"); break;
|
|
||||||
case 179: sprintf(outptr, "³"); break;
|
|
||||||
case 180: sprintf(outptr, "´"); break;
|
|
||||||
case 181: sprintf(outptr, "µ"); break;
|
|
||||||
case 182: sprintf(outptr, "¶"); break;
|
|
||||||
case 183: sprintf(outptr, "·"); break;
|
|
||||||
case 184: sprintf(outptr, "¸"); break;
|
|
||||||
case 185: sprintf(outptr, "&supl;"); break;
|
|
||||||
case 186: sprintf(outptr, "º"); break;
|
|
||||||
case 187: sprintf(outptr, "»"); break;
|
|
||||||
case 188: sprintf(outptr, "¼"); break;
|
|
||||||
case 189: sprintf(outptr, "½"); break;
|
|
||||||
case 190: sprintf(outptr, "¾"); break;
|
|
||||||
case 191: sprintf(outptr, "¿"); break;
|
|
||||||
case 192: sprintf(outptr, "À"); break;
|
|
||||||
case 193: sprintf(outptr, "Á"); break;
|
|
||||||
case 194: sprintf(outptr, "Â"); break;
|
|
||||||
case 195: sprintf(outptr, "Ã"); break;
|
|
||||||
case 196: sprintf(outptr, "Ä"); break;
|
|
||||||
case 197: sprintf(outptr, "Å"); break;
|
|
||||||
case 198: sprintf(outptr, "Æ"); break;
|
|
||||||
case 199: sprintf(outptr, "Ç"); break;
|
|
||||||
case 200: sprintf(outptr, "È"); break;
|
|
||||||
case 201: sprintf(outptr, "É"); break;
|
|
||||||
case 202: sprintf(outptr, "Ê"); break;
|
|
||||||
case 203: sprintf(outptr, "Ë"); break;
|
|
||||||
case 204: sprintf(outptr, "Ì"); break;
|
|
||||||
case 205: sprintf(outptr, "Í"); break;
|
|
||||||
case 206: sprintf(outptr, "Î"); break;
|
|
||||||
case 207: sprintf(outptr, "Ï"); break;
|
|
||||||
case 208: sprintf(outptr, "Ð"); break;
|
|
||||||
case 209: sprintf(outptr, "Ñ"); break;
|
|
||||||
case 210: sprintf(outptr, "Ò"); break;
|
|
||||||
case 211: sprintf(outptr, "Ó"); break;
|
|
||||||
case 212: sprintf(outptr, "Ô"); break;
|
|
||||||
case 213: sprintf(outptr, "Õ"); break;
|
|
||||||
case 214: sprintf(outptr, "Ö"); break;
|
|
||||||
case 215: sprintf(outptr, "×"); break;
|
|
||||||
case 216: sprintf(outptr, "Ø"); break;
|
|
||||||
case 217: sprintf(outptr, "Ù"); break;
|
|
||||||
case 218: sprintf(outptr, "Ú"); break;
|
|
||||||
case 219: sprintf(outptr, "Û"); break;
|
|
||||||
case 220: sprintf(outptr, "Ü"); break;
|
|
||||||
case 221: sprintf(outptr, "Ý"); break;
|
|
||||||
case 222: sprintf(outptr, "Þ"); break;
|
|
||||||
case 223: sprintf(outptr, "ß"); break;
|
|
||||||
case 224: sprintf(outptr, "à"); break;
|
|
||||||
case 225: sprintf(outptr, "á"); break;
|
|
||||||
case 226: sprintf(outptr, "â"); break;
|
|
||||||
case 227: sprintf(outptr, "ã"); break;
|
|
||||||
case 228: sprintf(outptr, "ä"); break;
|
|
||||||
case 229: sprintf(outptr, "å"); break;
|
|
||||||
case 230: sprintf(outptr, "æ"); break;
|
|
||||||
case 231: sprintf(outptr, "ç"); break;
|
|
||||||
case 232: sprintf(outptr, "è"); break;
|
|
||||||
case 233: sprintf(outptr, "é"); break;
|
|
||||||
case 234: sprintf(outptr, "ê"); break;
|
|
||||||
case 235: sprintf(outptr, "ë"); break;
|
|
||||||
case 236: sprintf(outptr, "ì"); break;
|
|
||||||
case 237: sprintf(outptr, "í"); break;
|
|
||||||
case 238: sprintf(outptr, "î"); break;
|
|
||||||
case 239: sprintf(outptr, "ï"); break;
|
|
||||||
case 240: sprintf(outptr, "ð"); break;
|
|
||||||
case 241: sprintf(outptr, "ñ"); break;
|
|
||||||
case 242: sprintf(outptr, "ò"); break;
|
|
||||||
case 243: sprintf(outptr, "ó"); break;
|
|
||||||
case 244: sprintf(outptr, "ô"); break;
|
|
||||||
case 245: sprintf(outptr, "õ"); break;
|
|
||||||
case 246: sprintf(outptr, "ö"); break;
|
|
||||||
case 247: sprintf(outptr, "÷"); break;
|
|
||||||
case 248: sprintf(outptr, "ø"); break;
|
|
||||||
case 249: sprintf(outptr, "ù"); break;
|
|
||||||
case 250: sprintf(outptr, "ú"); break;
|
|
||||||
case 251: sprintf(outptr, "û"); break;
|
|
||||||
case 252: sprintf(outptr, "ü"); break;
|
|
||||||
case 253: sprintf(outptr, "ý"); break;
|
|
||||||
case 254: sprintf(outptr, "þ"); break;
|
|
||||||
case 255: sprintf(outptr, "ÿ"); break;
|
|
||||||
default: *outptr++ = *inptr; *outptr = '\0'; break;
|
|
||||||
}
|
}
|
||||||
while (*outptr)
|
|
||||||
outptr++;
|
|
||||||
|
|
||||||
inptr++;
|
|
||||||
}
|
}
|
||||||
*outptr = '\0';
|
}
|
||||||
|
}
|
||||||
|
free(line);
|
||||||
|
free(temp);
|
||||||
|
gfilepos = ftell(fi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -273,41 +190,42 @@ char *rfcdate(time_t now)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create the macro's for the navigation bar.
|
||||||
|
*/
|
||||||
void pagelink(FILE *, char *, int, int);
|
void pagelink(FILE *, char *, int, int);
|
||||||
void pagelink(FILE *fa, char *Path, int inArea, int Current)
|
void pagelink(FILE *fa, char *Path, int inArea, int Current)
|
||||||
{
|
{
|
||||||
char nr[20];
|
char temp[256], nr[25];
|
||||||
|
|
||||||
fprintf(fa, "<DIV align=center>\n");
|
|
||||||
|
|
||||||
if ((Current >= CFG.www_files_page) && (inArea >= CFG.www_files_page)) {
|
if ((Current >= CFG.www_files_page) && (inArea >= CFG.www_files_page)) {
|
||||||
if (((Current / CFG.www_files_page) - 1) > 0)
|
if (((Current / CFG.www_files_page) - 1) > 0) {
|
||||||
sprintf(nr, "%d", (Current / CFG.www_files_page) -1);
|
sprintf(nr, "%d", (Current / CFG.www_files_page) -1);
|
||||||
else
|
} else {
|
||||||
nr[0] = '\0';
|
nr[0] = '\0';
|
||||||
fprintf(fa, "<A HREF=\"%s/%s%s/index%s.html\"><IMG SRC=\"/icons/%s\" ALT=\"%s\" BORDER=0>%s</A> \n",
|
|
||||||
CFG.www_url, CFG.www_link2ftp, Path+strlen(CFG.ftp_base), nr,
|
|
||||||
CFG.www_icon_prev, CFG.www_name_prev, CFG.www_name_prev);
|
|
||||||
}
|
}
|
||||||
|
sprintf(temp, "%s/%s%s/index%s.html", CFG.www_url, CFG.www_link2ftp, Path+strlen(CFG.ftp_base), nr);
|
||||||
fprintf(fa, "<A HREF=\"%s/index.html\"><IMG SRC=\"/icons/%s\" ALT=\"%s\" BORDER=0>%s</A> \n",
|
MacroVars("c", "s", temp);
|
||||||
CFG.www_url, CFG.www_icon_home, CFG.www_name_home, CFG.www_name_home);
|
} else {
|
||||||
fprintf(fa, "<A HREF=\"%s/%s/index.html\"><IMG SRC=\"/icons/%s\" ALT=\"%s\" BORDER=0>%s</A>\n",
|
MacroVars("c", "s", "");
|
||||||
CFG.www_url, CFG.www_link2ftp, CFG.www_icon_back, CFG.www_name_back, CFG.www_name_back);
|
}
|
||||||
|
|
||||||
if ((Current < (inArea - CFG.www_files_page)) && (inArea >= CFG.www_files_page)) {
|
if ((Current < (inArea - CFG.www_files_page)) && (inArea >= CFG.www_files_page)) {
|
||||||
fprintf(fa, " <A HREF=\"%s/%s%s/index%d.html\"><IMG SRC=\"/icons/%s\" ALT=\"%s\" BORDER=0>%s</A>\n",
|
sprintf(temp, "%s/%s%s/index%d.html", CFG.www_url, CFG.www_link2ftp, Path+strlen(CFG.ftp_base),
|
||||||
CFG.www_url, CFG.www_link2ftp, Path+strlen(CFG.ftp_base), (Current / CFG.www_files_page) + 1,
|
(Current / CFG.www_files_page) + 1);
|
||||||
CFG.www_icon_next, CFG.www_name_next, CFG.www_name_next);
|
MacroVars("d", "s", temp);
|
||||||
|
} else {
|
||||||
|
MacroVars("d", "s", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fa, "</DIV><P>\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE *newpage(char *, char *, time_t, int, int);
|
/*
|
||||||
FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current)
|
* Start a new file areas page
|
||||||
|
*/
|
||||||
|
FILE *newpage(char *, char *, time_t, int, int, FILE *);
|
||||||
|
FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current, FILE *fi)
|
||||||
{
|
{
|
||||||
char linebuf[1024], outbuf[1024];
|
char linebuf[1024], outbuf[1024];
|
||||||
static FILE* fa;
|
static FILE* fa;
|
||||||
@ -322,21 +240,9 @@ FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current)
|
|||||||
} else {
|
} else {
|
||||||
sprintf(linebuf, "%s", Name);
|
sprintf(linebuf, "%s", Name);
|
||||||
html_massage(linebuf, outbuf);
|
html_massage(linebuf, outbuf);
|
||||||
fprintf(fa, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n");
|
MacroVars("ab", "ss", rfcdate(later), outbuf);
|
||||||
fprintf(fa, "<HTML>\n");
|
|
||||||
fprintf(fa, "<!-- Page created by MBSE BBS v%s -->\n", VERSION);
|
|
||||||
fprintf(fa, "<META http-equiv=\"Expires\" content=\"%s\">\n", rfcdate(later));
|
|
||||||
fprintf(fa, "<META http-equiv=\"Cache-Control\" content=\"no-cache, must-revalidate\">\n");
|
|
||||||
fprintf(fa, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", CFG.www_charset);
|
|
||||||
fprintf(fa, "<META name=\"%s\" lang=\"en\" content=\"%s\">\n", CFG.www_author, outbuf);
|
|
||||||
fprintf(fa, "<HEAD><TITLE>%s</TITLE>\n", outbuf);
|
|
||||||
fprintf(fa, "<LINK rel=stylesheet HREF=\"%s/%s/css/files.css\">\n", CFG.www_url, CFG.www_link2ftp);
|
|
||||||
fprintf(fa, "<STYLE TYPE=\"text/css\">\n");
|
|
||||||
fprintf(fa, "</STYLE>\n</HEAD>\n<BODY>\n");
|
|
||||||
pagelink(fa, Path, inArea, Current);
|
pagelink(fa, Path, inArea, Current);
|
||||||
fprintf(fa, "<H1 align=center>File index of %s</H1><P>\n", outbuf);
|
MacroRead(fi, fa);
|
||||||
fprintf(fa, "<TABLE align=center width=750>\n");
|
|
||||||
fprintf(fa, "<TR><TH>Nr.</TH><TH>Filename</TH><TH>Date</TH><TH>Size</TH><TH>Downloads</TH><TH>Description</TH></TR>\n");
|
|
||||||
return fa;
|
return fa;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -344,8 +250,11 @@ FILE *newpage(char *Path, char *Name, time_t later, int inArea, int Current)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void closepage(FILE *, char *, int, int);
|
/*
|
||||||
void closepage(FILE *fa, char *Path, int inArea, int Current)
|
* Finish a files area page
|
||||||
|
*/
|
||||||
|
void closepage(FILE *, char *, int, int, FILE *);
|
||||||
|
void closepage(FILE *fa, char *Path, int inArea, int Current, FILE *fi)
|
||||||
{
|
{
|
||||||
char *temp1, *temp2;
|
char *temp1, *temp2;
|
||||||
|
|
||||||
@ -354,9 +263,7 @@ void closepage(FILE *fa, char *Path, int inArea, int Current)
|
|||||||
|
|
||||||
temp1 = calloc(PATH_MAX, sizeof(char));
|
temp1 = calloc(PATH_MAX, sizeof(char));
|
||||||
temp2 = calloc(PATH_MAX, sizeof(char));
|
temp2 = calloc(PATH_MAX, sizeof(char));
|
||||||
fprintf(fa, "</TABLE><P>\n");
|
MacroRead(fi, fa);
|
||||||
pagelink(fa, Path, inArea, lastfile);
|
|
||||||
fprintf(fa, "</BODY></HTML>\n");
|
|
||||||
fclose(fa);
|
fclose(fa);
|
||||||
if (lastfile) {
|
if (lastfile) {
|
||||||
sprintf(temp1, "%s/index%d.html", Path, lastfile / CFG.www_files_page);
|
sprintf(temp1, "%s/index%d.html", Path, lastfile / CFG.www_files_page);
|
||||||
@ -380,17 +287,18 @@ void closepage(FILE *fa, char *Path, int inArea, int Current)
|
|||||||
*/
|
*/
|
||||||
void Index(void)
|
void Index(void)
|
||||||
{
|
{
|
||||||
FILE *pAreas, *pFile, *pIndex, *fa, *fm, *fp;
|
FILE *pAreas, *pFile, *pIndex, *fa, *fb = NULL, *fm, *fp, *fi = NULL;
|
||||||
unsigned long i, iAreas, iAreasNew = 0, record, KSize = 0L, aSize = 0;
|
unsigned long i, iAreas, iAreasNew = 0, record, KSize = 0L, aSize = 0;
|
||||||
int iTotal = 0, AreaNr = 0, j, z, x = 0, Areas = 0;
|
int iTotal = 0, AreaNr = 0, j, k, z, x = 0, Areas = 0;
|
||||||
int Total = 0, aTotal = 0, inArea = 0, filenr;
|
int Total = 0, aTotal = 0, inArea = 0, filenr;
|
||||||
int fbAreas = 0, fbFiles = 0;
|
int fbAreas = 0, fbFiles = 0;
|
||||||
char *sAreas, *fAreas, *newdir = NULL, *sIndex, *fn, *temp;
|
char *sAreas, *fAreas, *newdir = NULL, *sIndex, *fn, *temp;
|
||||||
char linebuf[1024], outbuf[1024];
|
char linebuf[1024], outbuf[1024], desc[1500];
|
||||||
time_t last = 0L, later;
|
time_t last = 0L, later;
|
||||||
Findex *fdx = NULL;
|
Findex *fdx = NULL;
|
||||||
Findex *tmp;
|
Findex *tmp;
|
||||||
struct FILEIndex idx;
|
struct FILEIndex idx;
|
||||||
|
long fileptr = 0, fileptr1 = 0;
|
||||||
|
|
||||||
sAreas = calloc(PATH_MAX, sizeof(char));
|
sAreas = calloc(PATH_MAX, sizeof(char));
|
||||||
fAreas = calloc(PATH_MAX, sizeof(char));
|
fAreas = calloc(PATH_MAX, sizeof(char));
|
||||||
@ -436,6 +344,14 @@ void Index(void)
|
|||||||
Syslog('+', "FTP/HTML not defined, skipping html pages creation");
|
Syslog('+', "FTP/HTML not defined, skipping html pages creation");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fm) {
|
||||||
|
if ((fi = OpenMacro("html.main", 'E', TRUE)) == NULL) {
|
||||||
|
Syslog('+', "Can't open macro file, skipping html pages creation");
|
||||||
|
fclose(fm);
|
||||||
|
unlink(fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fm) {
|
if (fm) {
|
||||||
/*
|
/*
|
||||||
* Because these web pages are dynamic, ie. they change everytime you
|
* Because these web pages are dynamic, ie. they change everytime you
|
||||||
@ -445,22 +361,9 @@ void Index(void)
|
|||||||
* also have an author name, this is the bbs name, and a content
|
* also have an author name, this is the bbs name, and a content
|
||||||
* description for search engines. Automatic advertising.
|
* description for search engines. Automatic advertising.
|
||||||
*/
|
*/
|
||||||
sprintf(linebuf, "File areas at %s", CFG.bbs_name);
|
MacroVars("acd", "sdd", rfcdate(later), 0, 0);
|
||||||
html_massage(linebuf, outbuf);
|
MacroRead(fi, fm);
|
||||||
fprintf(fm, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n");
|
fileptr = ftell(fi);
|
||||||
fprintf(fm, "<HTML>\n");
|
|
||||||
fprintf(fm, "<!-- Page created by MBSE BBS v%s -->\n", VERSION);
|
|
||||||
fprintf(fm, "<META http-equiv=\"Expires\" content=\"%s\">\n", rfcdate(later));
|
|
||||||
fprintf(fm, "<META http-equiv=\"Cache-Control\" content=\"no-cache, must-revalidate\">\n");
|
|
||||||
fprintf(fm, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">\n", CFG.www_charset);
|
|
||||||
fprintf(fm, "<META name=\"%s\" lang=\"en\" content=\"%s\">\n", CFG.www_author, outbuf);
|
|
||||||
fprintf(fm, "<HEAD><TITLE>%s</TITLE>\n", outbuf);
|
|
||||||
fprintf(fm, "<LINK rel=stylesheet HREF=\"%s/%s/css/files.css\">\n", CFG.www_url, CFG.www_link2ftp);
|
|
||||||
fprintf(fm, "<STYLE TYPE=\"text/css\">\n");
|
|
||||||
fprintf(fm, "</STYLE>\n</HEAD>\n<BODY>\n");
|
|
||||||
fprintf(fm, "<H2 align=center>%s</H2><P>\n", outbuf);
|
|
||||||
fprintf(fm, "<TABLE align=center width=750>\n");
|
|
||||||
fprintf(fm, "<TR><TH>Area</TH><TH>Description</TH><TH>Files</TH><TH>Total size</TH><TH>Last added</TH></TR>\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i <= iAreas; i++) {
|
for (i = 1; i <= iAreas; i++) {
|
||||||
@ -576,7 +479,12 @@ void Index(void)
|
|||||||
aSize = 0L;
|
aSize = 0L;
|
||||||
aTotal = 0;
|
aTotal = 0;
|
||||||
last = 0L;
|
last = 0L;
|
||||||
fa = newpage(area.Path, area.Name, later, inArea, aTotal);
|
if ((fb = OpenMacro("html.areas", 'E', TRUE)) == NULL) {
|
||||||
|
fa = NULL;
|
||||||
|
} else {
|
||||||
|
fa = newpage(area.Path, area.Name, later, inArea, aTotal, fb);
|
||||||
|
fileptr1 = gfilepos;
|
||||||
|
}
|
||||||
while (fread(&file, sizeof(file), 1, pFile) == 1) {
|
while (fread(&file, sizeof(file), 1, pFile) == 1) {
|
||||||
if ((!file.Deleted) && (!file.Missing)) {
|
if ((!file.Deleted) && (!file.Missing)) {
|
||||||
/*
|
/*
|
||||||
@ -601,7 +509,7 @@ void Index(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fa, "<TR><TD align=right valign=top>%d</TD>", aTotal);
|
MacroVars("e", "d", aTotal);
|
||||||
/*
|
/*
|
||||||
* Check if this is a .gif or .jpg file, if so then
|
* Check if this is a .gif or .jpg file, if so then
|
||||||
* check if a thumbnail file exists. If not try to
|
* check if a thumbnail file exists. If not try to
|
||||||
@ -619,44 +527,47 @@ void Index(void)
|
|||||||
chmod(outbuf, 0644);
|
chmod(outbuf, 0644);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(fa, "<TD align=center valign=top><A HREF=\"%s/%s%s/%s\">",
|
sprintf(outbuf, "%s/%s%s/%s", CFG.www_url, CFG.www_link2ftp,
|
||||||
CFG.www_url, CFG.www_link2ftp,
|
|
||||||
area.Path+strlen(CFG.ftp_base), file.LName);
|
area.Path+strlen(CFG.ftp_base), file.LName);
|
||||||
fprintf(fa, "<IMG SRC=\"%s/%s%s/.%s\" ALT=\"%s\" BORDER=0>",
|
sprintf(linebuf, "%s/%s%s/.%s", CFG.www_url, CFG.www_link2ftp,
|
||||||
CFG.www_url, CFG.www_link2ftp,
|
area.Path+strlen(CFG.ftp_base), file.LName);
|
||||||
area.Path+strlen(CFG.ftp_base), file.LName, file.LName);
|
MacroVars("fghi", "dsss", 1, outbuf, file.LName, linebuf);
|
||||||
fprintf(fa, "</A></TD>");
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(fa, "<TD valign=top><A HREF=\"%s/%s%s/%s\">%s</A></TD>",
|
sprintf(outbuf, "%s/%s%s/%s", CFG.www_url, CFG.www_link2ftp,
|
||||||
CFG.www_url, CFG.www_link2ftp,
|
area.Path+strlen(CFG.ftp_base), file.LName);
|
||||||
area.Path+strlen(CFG.ftp_base), file.LName, file.LName);
|
MacroVars("fghi", "dsss", 0, outbuf, file.LName, "");
|
||||||
}
|
}
|
||||||
fprintf(fa, "<TD valign=top>%s</TD>", StrDateDMY(file.FileDate));
|
sprintf(outbuf, "%lu Kb.", (long)(file.Size / 1024));
|
||||||
fprintf(fa, "<TD align=right valign=top>%lu Kb.</TD>",
|
MacroVars("jkl", "ssd", StrDateDMY(file.FileDate), outbuf, file.TimesDL+file.TimesFTP+file.TimesReq);
|
||||||
(long)(file.Size / 1024));
|
memset(&desc, 0, sizeof(desc));
|
||||||
fprintf(fa, "<TD valign=top>%8ld</TD>",
|
k = 0;
|
||||||
file.TimesDL + file.TimesFTP + file.TimesReq);
|
|
||||||
fprintf(fa, "<TD><PRE>");
|
|
||||||
for (j = 0; j < 25; j++)
|
for (j = 0; j < 25; j++)
|
||||||
if (strlen(file.Desc[j])) {
|
if (strlen(file.Desc[j])) {
|
||||||
if (j)
|
if (j) {
|
||||||
fprintf(fa, "\n");
|
sprintf(desc+k, "\n");
|
||||||
|
k += 1;
|
||||||
|
}
|
||||||
sprintf(linebuf, "%s", strkconv(file.Desc[j], CHRS_DEFAULT_FTN, CHRS_DEFAULT_RFC));
|
sprintf(linebuf, "%s", strkconv(file.Desc[j], CHRS_DEFAULT_FTN, CHRS_DEFAULT_RFC));
|
||||||
html_massage(linebuf, outbuf);
|
html_massage(linebuf, outbuf);
|
||||||
fprintf(fa, "%s", outbuf);
|
sprintf(desc+k, "%s", outbuf);
|
||||||
|
k += strlen(outbuf);
|
||||||
}
|
}
|
||||||
fprintf(fa, "</PRE></TD></TR>\n");
|
MacroVars("m", "s", desc);
|
||||||
|
fseek(fb, fileptr1, SEEK_SET);
|
||||||
|
MacroRead(fb, fa);
|
||||||
aSize += file.Size;
|
aSize += file.Size;
|
||||||
if (file.FileDate > last)
|
if (file.FileDate > last)
|
||||||
last = file.FileDate;
|
last = file.FileDate;
|
||||||
if ((aTotal % CFG.www_files_page) == 0) {
|
if ((aTotal % CFG.www_files_page) == 0) {
|
||||||
closepage(fa, area.Path, inArea, aTotal);
|
closepage(fa, area.Path, inArea, aTotal, fb);
|
||||||
fa = newpage(area.Path, area.Name, later, inArea, aTotal);
|
fseek(fb, 0, SEEK_SET);
|
||||||
|
fa = newpage(area.Path, area.Name, later, inArea, aTotal, fb);
|
||||||
}
|
}
|
||||||
} /* if (!file.deleted) */
|
} /* if (!file.deleted) */
|
||||||
}
|
}
|
||||||
KSize += aSize / 1024;
|
KSize += aSize / 1024;
|
||||||
closepage(fa, area.Path, inArea, aTotal);
|
closepage(fa, area.Path, inArea, aTotal, fb);
|
||||||
|
fclose(fb);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
chmod(temp, 0644);
|
chmod(temp, 0644);
|
||||||
|
|
||||||
@ -674,17 +585,18 @@ void Index(void)
|
|||||||
Syslog('+', "Removed obsolete %s", linebuf);
|
Syslog('+', "Removed obsolete %s", linebuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(fm, "<TR><TD align=right>%d</TD><TD><A HREF=\"%s/%s%s/index.html\">%s</A></TD>",
|
sprintf(linebuf, "%s/%s%s/index.html", CFG.www_url, CFG.www_link2ftp, area.Path+strlen(CFG.ftp_base));
|
||||||
AreaNr, CFG.www_url, CFG.www_link2ftp, area.Path+strlen(CFG.ftp_base), area.Name);
|
|
||||||
fprintf(fm, "<TD align=right>%d</TD>", aTotal);
|
|
||||||
if (aSize > 1048576)
|
if (aSize > 1048576)
|
||||||
fprintf(fm, "<TD align=right>%ld Mb.</TD>", aSize / 1048576);
|
sprintf(outbuf, "%ld Mb.", aSize / 1048576);
|
||||||
else
|
else
|
||||||
fprintf(fm, "<TD align=right>%ld Kb.</TD>", aSize / 1024);
|
sprintf(outbuf, "%ld Kb.", aSize / 1024);
|
||||||
|
MacroVars("efghi", "dssds", AreaNr, linebuf, area.Name, aTotal, outbuf);
|
||||||
if (last == 0L)
|
if (last == 0L)
|
||||||
fprintf(fm, "<TD> </TD></TR>\n");
|
MacroVars("j", "s", " ");
|
||||||
else
|
else
|
||||||
fprintf(fm, "<TD align=center>%s</TD></TR>\n", StrDateDMY(last));
|
MacroVars("j", "s", StrDateDMY(last));
|
||||||
|
fseek(fi, fileptr, SEEK_SET);
|
||||||
|
MacroRead(fi, fm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(pFile);
|
fclose(pFile);
|
||||||
@ -693,12 +605,10 @@ void Index(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fm) {
|
if (fm) {
|
||||||
fprintf(fm, "<TR align=right><TH> </TH><TH>Total</TH><TD>%d</TD><TD>%ld Mb.</TD><TD> </TD></TR>\n",
|
sprintf(linebuf, "%ld Mb.", KSize / 1024);
|
||||||
Total, KSize / 1024);
|
MacroVars("cd", "ds", Total, linebuf);
|
||||||
fprintf(fm, "</TABLE><P>\n");
|
MacroRead(fi, fm);
|
||||||
fprintf(fm, "<A HREF=\"/index.html\"><IMG SRC=\"/icons/%s\" ALT=\"%s\" BORDER=0>%s</A>\n",
|
fclose(fi);
|
||||||
CFG.www_icon_home, CFG.www_name_home, CFG.www_name_home);
|
|
||||||
fprintf(fm, "</BODY></HTML>\n");
|
|
||||||
fclose(fm);
|
fclose(fm);
|
||||||
sprintf(linebuf, "%s/index.html", CFG.ftp_base);
|
sprintf(linebuf, "%s/index.html", CFG.ftp_base);
|
||||||
rename(fn, linebuf);
|
rename(fn, linebuf);
|
||||||
|
@ -93,7 +93,7 @@ void WriteMailGroups(FILE *fp, faddr *f)
|
|||||||
faddr *g;
|
faddr *g;
|
||||||
fpos_t fileptr;
|
fpos_t fileptr;
|
||||||
|
|
||||||
if ((fi = OpenMacro("areamgr.group", nodes.Language)) == NULL)
|
if ((fi = OpenMacro("areamgr.group", nodes.Language, FALSE)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
@ -150,7 +150,7 @@ void WriteFileGroups(FILE *fp, faddr *f)
|
|||||||
faddr *g;
|
faddr *g;
|
||||||
fpos_t fileptr;
|
fpos_t fileptr;
|
||||||
|
|
||||||
if ((fi = OpenMacro("filemgr.group", nodes.Language)) == NULL)
|
if ((fi = OpenMacro("filemgr.group", nodes.Language, FALSE)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MacroRead(fi, fp);
|
MacroRead(fi, fp);
|
||||||
@ -414,7 +414,7 @@ void GetRpSubject(const char *report, char* subject)
|
|||||||
int res;
|
int res;
|
||||||
|
|
||||||
temp = calloc(256,sizeof(char));
|
temp = calloc(256,sizeof(char));
|
||||||
if ((fi=OpenMacro(report, nodes.Language))!=NULL){
|
if ((fi=OpenMacro(report, nodes.Language, FALSE))!=NULL){
|
||||||
while ( fgets(temp, 254, fi) != NULL )
|
while ( fgets(temp, 254, fi) != NULL )
|
||||||
if (temp[0] != '#')
|
if (temp[0] != '#')
|
||||||
ParseMacro(temp,&res);
|
ParseMacro(temp,&res);
|
||||||
@ -439,7 +439,7 @@ int MsgResult(const char * report, FILE *fo)
|
|||||||
temp = calloc(256,sizeof(char));
|
temp = calloc(256,sizeof(char));
|
||||||
resp = calloc(256,sizeof(char));
|
resp = calloc(256,sizeof(char));
|
||||||
|
|
||||||
if ((fi = OpenMacro(report, nodes.Language)) != NULL){
|
if ((fi = OpenMacro(report, nodes.Language, FALSE)) != NULL){
|
||||||
while ( fgets(temp, 254, fi) != NULL ){
|
while ( fgets(temp, 254, fi) != NULL ){
|
||||||
if (temp[0] != '#') {
|
if (temp[0] != '#') {
|
||||||
strncpy(resp, ParseMacro(temp, &res), 80);
|
strncpy(resp, ParseMacro(temp, &res), 80);
|
||||||
|
@ -148,7 +148,7 @@ long Msg_Top(char *template, int language, fidoaddr aka)
|
|||||||
|
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
|
|
||||||
if ((fi = OpenMacro(template, language))) {
|
if ((fi = OpenMacro(template, language, FALSE))) {
|
||||||
/*
|
/*
|
||||||
* First override default aka with current aka, then display header.
|
* First override default aka with current aka, then display header.
|
||||||
*/
|
*/
|
||||||
|
@ -1199,18 +1199,8 @@ int EditMsgRec(int Area)
|
|||||||
changed = TRUE;
|
changed = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!msgs.Active && Active) {
|
if (!msgs.Active && Active)
|
||||||
InitMsgRec();
|
|
||||||
msgs.Active = TRUE;
|
msgs.Active = TRUE;
|
||||||
/*
|
|
||||||
* Clear connections, just in case from older mbse versions
|
|
||||||
* might have left garbage here.
|
|
||||||
*/
|
|
||||||
fseek(tfil, 0, SEEK_SET);
|
|
||||||
memset(&System, 0, sizeof(System));
|
|
||||||
for (i = 0; i < (msgshdr.syssize / sizeof(sysconnect)); i++)
|
|
||||||
fwrite(&System, sizeof(System), 1, tfil);
|
|
||||||
}
|
|
||||||
SetScreen();
|
SetScreen();
|
||||||
break;
|
break;
|
||||||
case 15:E_INT( 13,52, msgs.DaysOld, "Maximum ^days^ to keep mail in this area")
|
case 15:E_INT( 13,52, msgs.DaysOld, "Maximum ^days^ to keep mail in this area")
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
# by Redy Rodriguez and Michiel Broek.
|
# by Redy Rodriguez and Michiel Broek.
|
||||||
#
|
#
|
||||||
DOOR=`basename $0`
|
DOOR=`basename $0`
|
||||||
COMMANDO="\"door $DOOR $*\r\""
|
COMMANDO="\"doors $DOOR $*\r\""
|
||||||
|
|
||||||
/usr/bin/sudo /opt/mbse/bin/bbsdoor.sh $DOOR $1
|
/usr/bin/sudo /opt/mbse/bin/bbsdoor.sh $DOOR $1
|
||||||
/usr/bin/sudo /opt/dosemu/bin/dosemu.bin \
|
/usr/bin/sudo /opt/dosemu/bin/dosemu.bin \
|
||||||
|
Reference in New Issue
Block a user