Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / rom / filesys / pfs3 / pfsdoctor / stats.c
blob1f396e5d163127c9bec38eadac1e1444f9859dd0
1 /* $Id$ */
2 /* $Log: stats.c $
3 * Revision 1.4 1999/05/28 05:07:33 Michiel
4 * Fixed bug occuring on empty directory blocks
5 * Added rbl.always fix; improved rbl.disksize fix
6 * Reduced cachesize
8 * Revision 1.3 1999/05/04 17:59:09 Michiel
9 * check mode, logfile, search rootblock implemented
10 * bugfixes
12 * Revision 1.2 1999/05/04 04:27:13 Michiel
13 * debugged upto buildrext
15 * Revision 1.1 1999/04/22 15:24:28 Michiel
16 * Initial revision
17 * */
19 #include <exec/types.h>
20 #include <stdio.h>
21 #include "pfs3.h"
22 #include "doctor.h"
24 static char msgbuffer[512];
25 static BOOL error = FALSE;
26 static BOOL fixed = FALSE;
28 void clearstats(void)
30 stats.numfiles =
31 stats.numdirs =
32 stats.numsoftlink =
33 stats.numhardlink =
34 stats.numrollover =
35 stats.fragmentedfiles =
36 stats.anodesused = 0;
38 volume.updatestats();
41 void adderror(char *message)
43 if (!error)
45 if (stats.blocknr)
46 error = TRUE;
47 stats.numerrors++;
50 if (message)
52 sprintf(msgbuffer, "ERROR: %s\n", message);
53 volume.showmsg(msgbuffer);
55 volume.updatestats();
58 void fixederror(char *message)
60 if (mode == check)
62 adderror(message);
63 return;
66 adderror(NULL);
68 if (!fixed)
70 if (stats.blocknr)
71 fixed = TRUE;
72 stats.errorsfixed++;
75 if (message)
77 sprintf(msgbuffer, "FIXED: %s\n", message);
78 volume.showmsg(msgbuffer);
80 else
81 volume.showmsg("FIXED\n");
83 volume.updatestats();
86 void enterblock(uint32 blknr)
88 if (blknr != stats.blocknr)
90 if (stats.blocknr)
91 stats.prevblknr = stats.blocknr;
92 stats.blocknr = blknr;
93 error = fixed = FALSE;
94 stats.blockschecked++;
95 volume.updatestats(); /* optimise !! */
99 void exitblock(void)
101 stats.blocknr = stats.prevblknr;
102 stats.prevblknr = 0;
103 return;