expr: support arbitrary-precision arithmetic
[platform/upstream/coreutils.git] / TODO
1 If you're interested in helping, here are some tasks that we've considered
2 over the years.  Beware: some are quite old and no longer valid.  To avoid
3 wasting your time by duplicating work or by working on a task that is no
4 longer pertinent, please search the mailing list and post your intent
5 before embarking on a big project.
6
7 ==================================================
8 document the following in coreutils.texi:
9   runcon
10   chcon
11   mktemp
12   [
13   pinky
14 Also document the SELinux changes.
15
16 Suggestion from Paul Eggert:
17   More generally, there's not that much use for imaxtostr nowadays,
18   since the inttypes module and newer versions of gettext allow things
19   like _("truncating %s at %" PRIdMAX " bytes") to work portably.
20   I suspect that (if someone cares to take the time) we can remove
21   all instances of imaxtostr and umaxtostr in coreutils and gnulib.
22
23 cp --recursive: use fts and *at functions to perform directory traversals
24   in source and destination hierarchy rather than forming full file names.
25   The latter (current) approach fails unnecessarily when the names
26   become very long, and requires space and time that is quadratic in the
27   depth of the hierarchy.  [Bo Borgerson is working on this]
28
29 printf:
30   Now that gnulib supports *printf("%a"), import one of the
31   *printf-posix modules so that printf(1) will support %a even on
32   platforms where the native *printf(3) is deficient.
33   Suggestion from Eric Blake.
34
35 renice: POSIX utility, needs implementing.
36   suggestion from Karl Berry (among others).
37   Bob Proulx is working on this.
38
39 install: add an option to specify the program used to strip binaries.
40   suggestion from Karl Berry
41
42 doc/coreutils.texi:
43   Address this comment: FIXME: mv's behavior in this case is system-dependent
44   Better still: fix the code so it's *not* system-dependent.
45
46 ls: add --format=FORMAT option that controls how each line is printed.
47
48 cp --no-preserve=X should not attempt to preserve attribute X
49   reported by Andreas Schwab
50
51 copy.c: Address the FIXME-maybe comment in copy_internal.
52 And once that's done, add an exclusion so that `cp --link'
53 no longer incurs the overhead of saving src. dev/ino and dest. filename
54 in the hash table.
55
56 Write an autoconf test to work around build failure in HPUX's 64-bit mode.
57 See notes in README -- and remove them once there's a work-around.
58
59 Integrate use of sendfile, suggested here:
60   http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
61 I don't plan to do that, since a few tests demonstrate no significant benefit.
62
63 Should printf '\0123' print "\n3"?
64   per report from TAKAI Kousuke on Mar 27
65   http://mail.gnu.org/archive/html/bug-coreutils/2003-03/index.html
66
67 printf: consider adapting builtins/printf.def from bash
68
69 df: add `--total' option, suggested here http://bugs.debian.org/186007
70
71 tail: don't use xlseek; it *exits*.
72   Instead, maybe use a macro and return nonzero.
73
74 tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
75
76 lib/strftime.c: Since %N is the only format that we need but that
77   glibc's strftime doesn't support, consider using a wrapper that
78   would expand /%(-_)?\d*N/ to the desired string and then pass the
79   resulting string to glibc's strftime.
80
81 unexpand: [http://www.opengroup.org/onlinepubs/007908799/xcu/unexpand.html]
82   printf 'x\t \t y\n'|unexpand -t 8,9 should print its input, unmodified.
83   printf 'x\t \t y\n'|unexpand -t 5,8 should print "x\ty\n"
84
85 Let GNU su use the `wheel' group if appropriate.
86   (there are a couple patches, already)
87
88 sort: Investigate better sorting algorithms; see Knuth vol. 3.
89
90   We tried list merge sort, but it was about 50% slower than the
91   recursive algorithm currently used by sortlines, and it used more
92   comparisons.  We're not sure why this was, as the theory suggests it
93   should do fewer comparisons, so perhaps this should be revisited.
94   List merge sort was implemented in the style of Knuth algorithm
95   5.2.4L, with the optimization suggested by exercise 5.2.4-22.  The
96   test case was 140,213,394 bytes, 426,4424 lines, text taken from the
97   GCC 3.3 distribution, sort.c compiled with GCC 2.95.4 and running on
98   Debian 3.0r1 GNU/Linux, 2.4GHz Pentium 4, single pass with no
99   temporary files and plenty of RAM.
100
101   Since comparisons seem to be the bottleneck, perhaps the best
102   algorithm to try next should be merge insertion.  See Knuth section
103   5.3.1, who credits Lester Ford, Jr. and Selmer Johnson, American
104   Mathematical Monthly 66 (1959), 387-389.
105
106 Remove suspicious uses of alloca (ones that may allocate more than
107    about 4k)
108
109 Adapt these contribution guidelines for coreutils:
110   http://sources.redhat.com/automake/contribute.html
111
112 Improve test coverage.
113   See HACKING for instructions on generating an html test coverage report.
114   Find a program that has poor coverage and improve.
115
116 Changes expected to go in, someday.
117 ======================================
118
119   dd patch from Olivier Delhomme
120
121   test/mv/*: clean up $other_partition_tmpdir in all cases
122
123   ls: when both -l and --dereference-command-line-symlink-to-dir are
124   specified, consider whether to let the latter select whether to
125   dereference command line symlinks to directories.  Since -l has
126   an implicit --NO-dereference-command-line-symlink-to-dir meaning.
127   Pointed out by Karl Berry.
128
129   dd: consider adding an option to suppress `bytes/block read/written'
130   output to stderr.  Suggested here:
131     http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
132
133   Pending copyright papers:
134   ------------------------
135   getpwnam from Bruce Korb
136
137   pb (progress bar) from Miika Pekkarinen
138
139   ------------------------------
140
141 Remove long-deprecated options.  Search case-insensitive for
142 `deprecated' and `remove in '.  Automate this.
143
144 Add a distcheck-time test to ensure that every distributed
145 file is either read-only(indicating generated) or is
146 version-controlled and up to date.
147
148 remove `%s' notation (now that they're all gone, add a maint.mk sc_
149     rule to ensure no new ones are added):
150   grep -E "\`%.{,4}s'" src/*.c
151
152 remove all uses of the `register' keyword: Done.  add a maint.mk rule
153   for this, too.
154
155 remove or adjust chown's --changes option, since it
156   can't always do what it currently says it does.
157
158 Support arbitrary-precision arithmetic in those tools for which it
159 makes sense.  Factor and expr already support this via libgmp.
160 The "test" program is covered via its string-based comparison of
161 integers.  To be converted: seq.
162
163 Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
164   multibyte aware.  The problem is that I want to avoid duplicating
165   significant blocks of logic, yet I also want to incur only minimal
166   (preferably `no') cost when operating in single-byte mode.
167
168 pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
169
170 -----
171
172 Copyright (C) 2002-2008 Free Software Foundation, Inc.
173
174 This program is free software: you can redistribute it and/or modify
175 it under the terms of the GNU General Public License as published by
176 the Free Software Foundation, either version 3 of the License, or
177 (at your option) any later version.
178
179 This program is distributed in the hope that it will be useful,
180 but WITHOUT ANY WARRANTY; without even the implied warranty of
181 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
182 GNU General Public License for more details.
183
184 You should have received a copy of the GNU General Public License
185 along with this program.  If not, see <http://www.gnu.org/licenses/>.