annotate www/cleanup.html @ 1178:f8432a8872e0 draft

More work on the cleanup page, partway through describing ifconfig.
author Rob Landley <rob@landley.net>
date Wed, 01 Jan 2014 15:00:44 -0600
parents 2b35f9c797ad
children 94eb7b9127d2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 <!--#include file="header.html" -->
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
3 <h1>Index</h1>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
4
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
5 <ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
6 <li><a href=#intro>Introduction</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
7 <li><a href=#advice>Advice</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
8 <li>Commands:</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
9 <ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
10 <li><a href=#uuencode>uuencode</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
11 <li><a href=#uudecode>uudecode</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
12 <li><a href=#ifconfig>ifconfig</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
13 <li><a href=#find>find</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
14 </ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
15 </ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
16
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
17 <hr>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
18
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
19 <a name=intro />
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 <h1>Cleaning up the toybox code.</h1>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
21
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
22 <p>Toybox <a href=http://landley.net/notes.html#31-03-2013>hasn't always</a>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
23 taken proper advantage of external contributions</a>.
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 Lots of people want to help, but their contributions languish out of tree
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 or in the "pending" directory, awaiting cleanup.</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
26
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 <p>Toybox's design goals require simpler, tighter, and more explicit code
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
28 than most other implementations, among other reasons to allow better security
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 auditing. Writing "another" implementation of standard command line tools
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 isn't very interesting, they should be _better_ implementations.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 Unfortunately, this means existing, working commands often take more effort to
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
32 clean up to Toybox's standards than writing a new one from scratch, not
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
33 because they don't work, but because we aim for an unusual level of polish.</p>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
34
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
35 <p>In hopes of teaching more people how to do this
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 cleanup work, I've started breaking cleanup changes into smaller chunks and
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
37 posting explanations of each change to the mailing list.
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
38 Below are indexes of such cleanup series. Each commit and post are meant to
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
39 be read together: each description explains what the corresponding patch
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
40 was trying to accomplish.</p>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
41
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
42 <p>Line/byte totals of completed series are given for scale, but the point
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
43 of this work is simplicity and compactness, not size per se.</p>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
44
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
45 <p>(Note: mercurial's web viewer doesn't follow renames, so although each
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
46 command name links to a commit list with the bulk of the changes, it may
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
47 not include the final version of each file moved from the "pending"
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
48 directory to its final location. The summaries link the initial and cleaned
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
49 versions of each file when giving line counts.)</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
50
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
51 <hr>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
52
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
53 <a name=advice />
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
54 <h1>General advice and/or policy.</h1>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
55
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
56 <p>The <a href=design.html>design of toybox</a> page and the coding
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
57 style section at the start of the <a href=code.html>source code walkthrough</a>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
58 don't cover everything. Here are some
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
59 links to mailing list messages that cover various programming topics
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
60 not directly related to a specific cleanup series:</p>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
61
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
62 <ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
63 <li><a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000850.html>Error messages and internationalization.</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
64 <li><a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000891.html>Why not "const"?</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
65 <li><a href=http://lkml.indiana.edu/hypermail/linux/kernel/1308.3/03890.html>Why not "bool"?</a> (explanation from Linus Torvalds)</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
66 <li><a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000893.html>Why not to check in debug code.</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
67 <li><a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-June/001044.html>Relationship between /proc and /sys</a> (/proc isn't obsolete and /sys is an ABI)</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
68 </ul>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
69
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
70 <hr>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
71
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
72 <a name="uuencode"><h1><a href=/hg/toybox/log/900/toys/pending/uuencode.c>uuencode</a></h1>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
73
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
74 <p>This is an example of cleaning up something
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
75 that started in a condition most projects would be quite happy with.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
76 The initial submission of uuencode and uudecode was a good high
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
77 quality contribution, written by a seasoned developer who did an excellent
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
78 job. It was still possible to shrink uuencode almost by half:</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
79
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
80 <ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
81 <li>old total: <a href=/hg/toybox/file/828/toys/pending/uuencode.c>116 lines (2743
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
82 bytes) in 7 functions</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
83 <li>new total: <a href=/hg/toybox/file/841/toys/posix/uuencode.c>67 lines (1440
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
84 bytes) in 1 function</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
85 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
86
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
87 <ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
88 <li>commit: <a href=/hg/toybox/rev/830>830</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
89 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000904.html>part 1</a> and
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
90 <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000903.html>part 2</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
91 <li>commit: <a href=/hg/toybox/rev/831>831</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
92 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000919.html>inline, default Y, move to toys/posix</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
93 <li>commit: <a href=/hg/toybox/rev/837>837</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
94 description: test suite.</li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
95 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
96
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
97 <p>Status: COMPLETE</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
98
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
99 <a name="uudecode"><h1><a href=/hg/toybox/log/900/toys/pending/uudecode.c>uudecode</a></h1>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
100
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
101 <p>I tried to do the uudecode cleanup in smaller stages than uuencode:</p>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
102
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
103 <ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
104 <li>old: <a href=/hg/toybox/file/828/toys/pending/uudecode.c>175
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
105 lines (4534 bytes) in 9 functions</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
106 <li>new: <a href=/hg/toybox/file/840/toys/posix/uudecode.c>107 lines
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
107 (2300 bytes) in 1 function</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
108 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
109
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
110 <ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
111 <li>commit: <a href=/hg/toybox/rev/833>833</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
112 description: preparatory adjustments to test suite.</li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
113 <li>commit: <a href=/hg/toybox/rev/835>835</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
114 description: todo</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
115 <li>commit: <a href=/hg/toybox/rev/838>838</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
116 description: todo</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
117 <li>commit: <a href=/hg/toybox/rev/839>839</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
118 description: todo</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
119 <li>commit: <a href=/hg/toybox/rev/839>839</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
120 description: todo (finish, move pending->posix, default y)</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
121 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
122
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
123 <p>Status: COMPLETE</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
124
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
125 <a name=ifconfig>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
126 <h1><a href=/hg/toybox/log/tip/toys/pending/ifconfig.c>ifconfig</a></h1>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
127
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
128 <p>When ifconfig was submitted, it touched a half-dozen files. I glued it
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
129 together into a single self-contained file, which needed a lot of
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
130 cleanup. The final version is about 1/3 the size of the original.</p>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
131
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
132 <ul>
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
133 <li>old total: <a href=/hg/toybox/file/841/toys/pending/ifconfig.c>1504 lines (44268 bytes) in 38 functions</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
134 <li>new total: <a href=/hg/toybox/file/1113/toys/other/ifconfig.c>521 lines (15963 bytes) in 4 function</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
135 </ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
136
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
137 <p>This was the first command I started cleaning up with the intent of
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
138 describing the process, and especially the first few entries in this
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
139 series describe many of the low hanging fruit techniques used to clean
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
140 up a codebase.</p>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
141
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
142 <ul>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
143 <li>commit: <a href=/hg/toybox/rev/843>843</a>, description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000882.html>Infrastructure in search of a user, code proximity,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
144 unnecessary #defines, shorter code is easier to read.</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
145 <li>commit: <a href=/hg/toybox/rev/844>844</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
146 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000881.html>Headers, replacing repeated code with loops,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
147 logical operators guaranteed to return 0 or 1, math on string constants,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
148 removing unnecessary variables and tests.</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
149 <li>commit: <a href=/hg/toybox/rev/852>852</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
150 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000921.html>hg commit numbers, documenting the obvious, ordering
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
151 to avoid prototypes, returning void, collate local declarations,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
152 use error_exit(), unnecessary parentheses, inline to remove variables/functions
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
153 used only once, using *var instead of var[0], unnecessary typecasts,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
154 xprintf("\n") vs xputc('\n')</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
155 <li>commit: <a href=/hg/toybox/rev/856>856</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
156 description: one line portability fix from Isaac Dunham</li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
157 <li>commit: <a href=/hg/toybox/rev/861>861</a>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
158 and <a href=/hg/toybox/rev/863>863</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
159 description:
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
160 <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000910.html>Help
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
161 infrastructure cleanup from Isaac Dunham</a>
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
162 (which I mis-applied and then <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000920.html>fixed plus some whitespace changes</a>)</li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
163
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
164 <li>commit: <a href=/hg/toybox/rev/862>862</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
165 <a href=/hg/toybox/rev/864>864</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
166 <a href=/hg/toybox/rev/866>866</a>: todo</li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
167
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
168 <li>commit: <a href=/hg/toybox/rev/869>869</a> and <a href=/hg/toybox/rev/870>870</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
169 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000928.html>869:
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
170 reorder to eliminate prototypes, put command_main() at end of file,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
171 870: long repeated variable prefixes, replacing struct+sscanf()+printf with a
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
172 loop and a table (from iface_list, get_proc_info(), display_ifconfig()),
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
173 use lib/xwrap.c functions to return void, why xstrcpy() fails closed,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
174 (functional comment: why multicast failed, CSLIP obsolecense), not being
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
175 _too_ clever.</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
176 <li>commit: <a href=/hg/toybox/rev/878>878</a> and <a href=/hg/toybox/rev/879>879</a>:
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
177 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000946.html>878: add xsocket(), free(NULL) is a safe NOP (posix!).
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
178 879: inline three functions and simplify, some simplifications only show up
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
179 after repeated inlining</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
180 <li>commit: <a href=/hg/toybox/rev/883>883</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
181 description: move some common code to lib/ and posix headers to toys.h.</li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
182 <li>commit: <a href=/hg/toybox/rev/898>898</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
183 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-May/000974.html>Replace ifconfig_main() if/else staircase with a loop over
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
184 an array, genericize - prefix logic, inline a use of set_flags().</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
185 <li>commit: <a href=/hg/toybox/rev/905>905</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
186 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-May/000992.html>remove unnecessary wrapper function, inlining more functions,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
187 relying on the values of constants that don't change across architectures
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
188 (binary backwards compatability), more ifconfig_main table work,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
189 man ioctl_list.</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
190 <li>commit: <a href=/hg/toybox/rev/906>906</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
191 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-May/000994.html>More ifconfig_main() table work, remove vestigial arguments
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
192 to functions, "a frenzy of inlining", slightly better error reporting,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
193 don't reinvent libc functions.</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
194 <li>commit: <a href=/hg/toybox/rev/907>907</a>,
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
195 <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-May/000995.html>inlining show_ip_addr() with a loop and a table, inlining hex_to_binary()
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
196 and set_hw_address(), stop validating data we supplied, remove a table
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
197 that's overkill (two entries, we don't even loop over it), when you don't need a
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
198 NULL terminator for array, remove unnecessary memcpy(offsetof()) with
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
199 assignment, trusting -funsigned-char.</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
200 <li>commit: <a href=/hg/toybox/rev/919>919</a>,
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
201 <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-June/001027.html>todo whitespace damage, introduce IFREQ_OFFSZ() and poke() to
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
202 ifconfig_main() table logic to fold more if/else parts into the table</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
203 <li>Status update: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-June/001033.html>Entering the home stretch on ifconfig</a> (and a <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-June/001043.html>note about infiniband</a>)</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
204 <li>commit: <a href=/hg/toybox/rev/921>921</a>, description: todo</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
205 <li>commit: <a href=/hg/toybox/rev/957>957</a>, description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-July/001121.html>here</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
206 <li>commit: <a href=/hg/toybox/rev/958>958</a>, description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-July/001131.html>here</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
207 <li>commit: <a href=/hg/toybox/rev/1104>1104</a>, description: todo</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
208 <li>commit: <a href=/hg/toybox/rev/1127>1127</a>, description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-November/001464.html>here</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
209 <li>commit: <a href=/hg/toybox/rev/1128>1128</a>, description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-November/001463.html>here</a></li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
210 <li>commit: <a href=/hg/toybox/rev/1132>1132</a>, description: promotion from pending to other</li>
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
211 <li>commit: <a href=/hg/toybox/rev/1132>1133</a>, description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-November/001462.html>cleanup help text, remove obsolete/NOP commands</a></li>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
212 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
213
1178
f8432a8872e0 More work on the cleanup page, partway through describing ifconfig.
Rob Landley <rob@landley.net>
parents: 1056
diff changeset
214 <p>Status: COMPLETE.</p>
1056
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
215
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
216 <h1><a href=/hg/toybox/log/tip/toys/pending/find.c>find</a></h1>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
217
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
218 <pre>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
219 814 Initial version by Gurang Shastri.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
220 815
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
221 816
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
222 847 Felix Janda
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
223 848 Whitespace (reindent from tabs -> 2 spaces)
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
224 849 More cleanup
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
225 867 Felix Janda Improve operator processing.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
226 874 Felix Janda
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
227 875 Felix Janda
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
228 887 Felix Janda fix -mtime
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
229 </pre>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
230
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
231 <ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
232 <li>commit: <a href=/hg/toybox/rev/849>849</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
233 description: <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000895.html>here</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
234 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
235
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
236 <p>Status: in progress.</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
237
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
238 <h1><a href=/hg/toybox/log/917/toys/pending/stat.c>stat</a></h1>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
239
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
240 <pre>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
241 747 initial submission
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
242 810 whitespace
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
243 811
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
244 871 whitespace (reindent from 4 spaces to 2)
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
245 872 Felix Janda cleanup
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
246 885 Felix Janda
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
247 move permission formatting (777 -> -rwxrwxrwx) from ls to lib so stat can reuse it.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
248 886 Felix Janda remove unimplemented options and clean up help text
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
249 910 Felix Janda Add support for stating multiple files.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
250 911 Felix Janda Separate stat and statfs.
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
251 912 <a href=/hg/toybox/rev/912>commit</a> <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-May/001019.html>description</a>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
252 <a href=http://lists.landley.net/pipermail/toybox-landley.net/2013-May/001024.html>design pondering</a>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
253
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
254 914 916
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
255 </pre>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
256 <ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
257 <li>commit: <a href=/hg/toybox/rev/917>917</a></li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
258 <li>commit: <a href=/hg/toybox/rev/918>918</a>,
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
259 description: move to posix, default y.</li>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
260 </ul>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
261
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
262 <p>Status: COMPLETE.</p>
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
263
2b35f9c797ad Pending cleanup page, less than half done. Some of it should probably move to the code style section.
Rob Landley <rob@landley.net>
parents:
diff changeset
264 <!--#include file="footer.html" -->