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