Added orphaned list structure

This commit is contained in:
Michiel Broek 2005-11-12 12:32:47 +00:00
parent 8de92928ec
commit 0f5bfdcb0a
5 changed files with 94 additions and 5 deletions

View File

@ -14,7 +14,7 @@ SRCS = addbbs.c backalias.c flock.c hatch.c mbdiff.c mgrutil.c qualify.c \
hash.c mbaff.c mbseq.c notify.c postnetmail.c scannews.c tosspkt.c \ hash.c mbaff.c mbseq.c notify.c postnetmail.c scannews.c tosspkt.c \
mbfkill.c mbfutil.c mbfindex.c mbfcheck.c mbfpack.c mbflist.c mbfadopt.c \ mbfkill.c mbfutil.c mbfindex.c mbfcheck.c mbfpack.c mbflist.c mbfadopt.c \
mbfimport.c mbfsort.c virscan.c mbftoberep.c mbfmove.c mbfdel.c bounce.c \ mbfimport.c mbfsort.c virscan.c mbftoberep.c mbfmove.c mbfdel.c bounce.c \
createm.c createf.c msgflags.c dirsession.c queue.c dirlock.c msg.c createm.c createf.c msgflags.c dirsession.c queue.c dirlock.c msg.c orphans.c
HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h qualify.h \ HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h qualify.h \
postnetmail.h scannews.h tosspkt.h addpkt.h bwrite.h forward.h \ postnetmail.h scannews.h tosspkt.h addpkt.h bwrite.h forward.h \
lhash.h mbfido.h mkftnhdr.h ptic.h sendmail.h tracker.h \ lhash.h mbfido.h mkftnhdr.h ptic.h sendmail.h tracker.h \
@ -25,7 +25,7 @@ HDRS = addbbs.h backalias.h flock.h hatch.h mbdiff.h mgrutil.h qualify.h \
atoul.h filemgr.h hash.h mbaff.h mbseq.h notify.h postemail.h scan.h toberep.h \ atoul.h filemgr.h hash.h mbaff.h mbseq.h notify.h postemail.h scan.h toberep.h \
mbfkill.h mbfutil.h mbfindex.h mbfcheck.h mbfpack.h mbflist.h mbfadopt.h \ mbfkill.h mbfutil.h mbfindex.h mbfcheck.h mbfpack.h mbflist.h mbfadopt.h \
mbfimport.h mbfsort.h virscan.h mbftoberep.h mbfmove.h mbfdel.h bounce.h \ mbfimport.h mbfsort.h virscan.h mbftoberep.h mbfmove.h mbfdel.h bounce.h \
createm.h createf.h msgflags.h dirsession.h queue.h dirlock.h msg.h createm.h createf.h msgflags.h dirsession.h queue.h dirlock.h msg.h orphans.h
MBFIDO_OBJS = flock.o tosspkt.o mbfido.o hatch.o maketags.o virscan.o tracker.o \ MBFIDO_OBJS = flock.o tosspkt.o mbfido.o hatch.o maketags.o virscan.o tracker.o \
makestat.o scannews.o lhash.o bounce.o unpack.o tic.o ptic.o \ makestat.o scannews.o lhash.o bounce.o unpack.o tic.o ptic.o \
utic.o mover.o hash.o mkftnhdr.o addbbs.o magic.o fsort.o toberep.o \ utic.o mover.o hash.o mkftnhdr.o addbbs.o magic.o fsort.o toberep.o \
@ -33,7 +33,7 @@ MBFIDO_OBJS = flock.o tosspkt.o mbfido.o hatch.o maketags.o virscan.o tracker.o
storenet.o storeecho.o areamgr.o filemgr.o notify.o mgrutil.o rollover.o \ storenet.o storeecho.o areamgr.o filemgr.o notify.o mgrutil.o rollover.o \
bwrite.o rfc2ftn.o rnews.o newspost.o aliasdb.o postemail.o postnetmail.o \ bwrite.o rfc2ftn.o rnews.o newspost.o aliasdb.o postemail.o postnetmail.o \
postecho.o backalias.o createm.o createf.o msgflags.o dirsession.o \ postecho.o backalias.o createm.o createf.o msgflags.o dirsession.o \
queue.o dirlock.o qualify.o msg.o queue.o dirlock.o qualify.o msg.o orphans.o
MBSEQ_OBJS = mbseq.o MBSEQ_OBJS = mbseq.o
MBAFF_OBJS = announce.o fflist.o filefind.o grlist.o mbaff.o msgutil.o toberep.o MBAFF_OBJS = announce.o fflist.o filefind.o grlist.o mbaff.o msgutil.o toberep.o
MBINDEX_OBJS = mbindex.o MBINDEX_OBJS = mbindex.o
@ -131,7 +131,7 @@ hatch.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h utic.h roll
mbdiff.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbdiff.h mbdiff.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbdiff.h
mgrutil.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h rollover.h addpkt.h createm.h createf.h mgrutil.h mgrutil.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h rollover.h addpkt.h createm.h createf.h mgrutil.h
qualify.o: ../config.h ../lib/mbselib.h qualify.h qualify.o: ../config.h ../lib/mbselib.h qualify.h
ptic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h mover.h toberep.h tic.h utic.h magic.h forward.h rollover.h ptic.h magic.h createf.h virscan.h qualify.h addbbs.h ptic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h mover.h toberep.h tic.h utic.h magic.h forward.h rollover.h ptic.h magic.h createf.h virscan.h qualify.h orphans.h addbbs.h
sendmail.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h addpkt.h rollover.h sendmail.h sendmail.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h addpkt.h rollover.h sendmail.h
tracker.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/nodelist.h ../lib/mbsedb.h tracker.h tracker.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/nodelist.h ../lib/mbsedb.h tracker.h
addpkt.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h addpkt.h addpkt.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h addpkt.h
@ -162,7 +162,7 @@ mbindex.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbindex.h
msgutil.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h msgutil.h msgutil.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h msgutil.h
postecho.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h qualify.h postecho.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ftn2rfc.h postecho.h storeecho.h addpkt.h rollover.h qualify.h
rollover.o: ../config.h ../lib/mbselib.h rollover.h rollover.o: ../config.h ../lib/mbselib.h rollover.h
tic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h ptic.h fsort.h tic.h tic.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h unpack.h ptic.h fsort.h orphans.h tic.h
areamgr.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h mgrutil.h scan.h createm.h areamgr.h areamgr.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/msg.h ../lib/msgtext.h ../lib/mbsedb.h ../lib/diesel.h sendmail.h mgrutil.h scan.h createm.h areamgr.h
filefind.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h fflist.h filefind.h msgutil.h filefind.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msg.h ../lib/msgtext.h ../lib/diesel.h fflist.h filefind.h msgutil.h
grlist.o: ../config.h ../lib/mbselib.h grlist.h grlist.o: ../config.h ../lib/mbselib.h grlist.h
@ -202,4 +202,5 @@ dirsession.o: ../config.h ../lib/mbselib.h dirsession.h
queue.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h fsort.h dirsession.h queue.h queue.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h fsort.h dirsession.h queue.h
dirlock.o: ../config.h ../lib/mbselib.h flock.h dirlock.h dirlock.o: ../config.h ../lib/mbselib.h flock.h dirlock.h
msg.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msgtext.h ../lib/msg.h msgflags.h msg.h msg.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h ../lib/msgtext.h ../lib/msg.h msgflags.h msg.h
orphans.o: ../config.h ../lib/mbselib.h orphans.h
# End of generated dependencies # End of generated dependencies

64
mbfido/orphans.c Normal file
View File

@ -0,0 +1,64 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: List of orphaned ticfiles
*
*****************************************************************************
* Copyright (C) 1997-2005
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
* 1971 BV IJmuiden
* the Netherlands
*
* This file is part of MBSE BBS.
*
* This BBS 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, or (at your option) any
* later version.
*
* MBSE BBS is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MBSE BBS; see the file COPYING. If not, write to the Free
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*****************************************************************************/
#include "../config.h"
#include "../lib/mbselib.h"
#include "orphans.h"
void tidy_orphans(orphans **qal)
{
orphans *tmp, *old;
for (tmp = *qal; tmp; tmp = old) {
old = tmp->next;
free(tmp);
}
*qal = NULL;
}
void fill_orphans(orphans **qal, char *TicName, char *Area, char *FileName, int Orphaned, int BadCRC)
{
orphans *tmp;
tmp = (orphans *)malloc(sizeof(orphans));
snprintf(tmp->TicName, 13, TicName);
snprintf(tmp->Area, 21, Area);
snprintf(tmp->FileName, 81, FileName);
tmp->Orphaned = Orphaned;
tmp->BadCRC = BadCRC;
tmp->Purged = FALSE;
*qal = tmp;
}

22
mbfido/orphans.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef _ORPHANS_H
#define _ORPHANS_H
/* $Id$ */
/*
* Linked list of orpaned ticfiles.
*/
typedef struct _orphans {
struct _orphans *next; /* Linked list */
char TicName[13]; /* TIC filename */
char Area[21]; /* TIC area */
char FileName[81]; /* TIC filename */
unsigned Orphaned : 1; /* Real orphaned file */
unsigned BadCRC : 1; /* Present but wrong crc */
unsigned Purged : 1; /* Can be purged */
} orphans;
void tidy_orphans(orphans **);
void fill_orphans(orphans **, char *, char *, char *, int, int);
#endif

View File

@ -45,6 +45,7 @@
#include "createf.h" #include "createf.h"
#include "virscan.h" #include "virscan.h"
#include "qualify.h" #include "qualify.h"
#include "orphans.h"
#include "addbbs.h" #include "addbbs.h"

View File

@ -35,6 +35,7 @@
#include "unpack.h" #include "unpack.h"
#include "ptic.h" #include "ptic.h"
#include "fsort.h" #include "fsort.h"
#include "orphans.h"
#include "tic.h" #include "tic.h"
#define UNPACK_FACTOR 300 #define UNPACK_FACTOR 300