Finished small tool

This commit is contained in:
Michiel Broek 2006-01-23 15:27:08 +00:00
parent 3faa687e99
commit 8b9379c78b

View File

@ -41,7 +41,8 @@ int main(int argc, char **argv)
INF_HEADER Inf;
INF_AREA_INFO AreaInf;
MIX_REC Mix;
int i;
FTI_REC Fti;
int i, pos;
printf("\nMBBW: MBSE BBS %s Bluewave Dump\n", VERSION);
printf(" %s\n\n", COPYRIGHT);
@ -152,6 +153,21 @@ int main(int argc, char **argv)
fclose(fp);
}
sprintf(temp, "%s.FTI", bwname);
pos = 0;
if ((fp = fopen(temp, "r"))) {
printf("---- %s.FTI -------------------------------------------------------\n\n", bwname);
printf(" Pos From Date Msgnum Replto Replat Ptr Length\n");
printf("------ ------------------------------------- ------------------- ------ ------ ------ ------ ------\n");
while (fread(&Fti, ORIGINAL_FTI_STRUCT_LEN, 1, fp)) {
printf("%6d %-36s %20s %6d %6d %6d %6d %6d\n", pos, Fti.from, Fti.date, Fti.msgnum, Fti.replyto, Fti.replyat,
Fti.msgptr, Fti.msglength);
pos += ORIGINAL_FTI_STRUCT_LEN;
}
fclose(fp);
}
free(bwname);
free(temp);
return 0;