Don't forget to munmap everything we've mmapped in all modes.
[sgt/agedu] / TODO
CommitLineData
70322ae3 1TODO list for agedu
2===================
3
50e82fdc 4 - we could still be using more of the information coming from
5 autoconf. Our config.h is defining a whole bunch of HAVE_FOOs for
6 particular functions (e.g. HAVE_INET_NTOA, HAVE_MEMCHR,
7 HAVE_FNMATCH). We could usefully supply alternatives for some of
8 these functions (e.g. cannibalise the PuTTY wildcard matcher for
9 use in the absence of fnmatch, switch to vanilla truncate() in
10 the absence of ftruncate); where we don't have alternative code,
11 it would perhaps be polite to throw an error at configure time
12 rather than allowing the subsequent build to fail.
13 + however, I don't see anything here that looks very
14 controversial; IIRC it's all in POSIX, for one thing. So more
15 likely this should simply wait until somebody complains.
16
17 - it would be useful to support a choice of indexing strategies.
18 The current system's tradeoff of taking O(N log N) space in order
19 to be able to support any age cutoff you like is not going to be
20 ideal for everybody. A second more conventional mechanism which
21 allows the user to specify a number of fixed cutoffs and just
22 indexes each directory on those alone would undoubtedly be a
23 useful thing for large-scale users. This will require
24 considerable thought about how to make the indexers pluggable at
25 both index-generation time and query time.
9c6e61f2 26
1e8d78b9 27 - IPv6 support in the HTTP server
cfe942fb 28 * of course, Linux magic auth can still work in this context; we
29 merely have to be prepared to open one of /proc/net/tcp or
30 /proc/net/tcp6 as appropriate.
1e8d78b9 31
70322ae3 32 - run-time configuration in the HTTP server
33 * I think this probably works by having a configuration form, or
34 a link pointing to one, somewhere on the report page. If you
35 want to reconfigure anything, you fill in and submit the form;
36 the web server receives HTTP GET with parameters and a
37 referer, adjusts its internal configuration, and returns an
38 HTTP redirect back to the referring page - which it then
39 re-renders in accordance with the change.
40 * All the same options should have their starting states
41 configurable on the command line too.
42
70322ae3 43 - curses-ish equivalent of the web output
44 + try using xterm 256-colour mode. Can (n)curses handle that? If
45 not, try doing it manually.
f2e52893 46 + I think my current best idea is to bypass ncurses and go
47 straight to terminfo: generate lines of attribute-interleaved
48 text and display them, so we only really need the sequences
49 "go here and display stuff", "scroll up", "scroll down".
f2e52893 50 + Infrastructure work before doing any of this would be to split
51 html.c into two: one part to prepare an abstract data
52 structure describing an HTML-like report (in particular, all
53 the index lookups, percentage calculation, vector arithmetic
54 and line sorting), and another part to generate the literal
55 HTML. Then the former can be reused to produce very similar
56 reports in coloured plain text.
70322ae3 57
f2e52893 58 - http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest
59 modern Windowses support atime-equivalents, so a Windows port is
373a02e5 60 possible in principle.
61 + For a full Windows port, would need to modify the current
62 structure a lot, to abstract away (at least) memory-mapping of
63 files, details of disk scan procedure, networking for httpd.
64 Unclear what the right UI would be on Windows, too;
65 command-line exactly as now might be considered just a
66 _little_ unfriendly. Or perhaps not.
67 + Alternatively, a much easier approach would be to write a
68 Windows version of just the --scan-dump mode, which does a
69 filesystem scan via the Windows API and generates a valid
70 agedu dump file on standard output. Then one would simply feed
71 that over the network connection of one's choice to the rest
72 of agedu running on Unix as usual.