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