home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d702
/
indent.lha
/
Indent
/
Indent.lha
/
indent-1.4Projects
< prev
next >
Wrap
Text File
|
1992-06-10
|
3KB
|
95 lines
* Someone requested an option to keep cases statments all on one line.
Consider an option to produce "char* c" rather than "char *c"
* There is no way to specify that a unary & (as in address-of
operator) not preceed it's argument by a space.
[rms: I agree that is a desirable mode we should support somehow.]
* It would be nice to have a different line length for comments than
for code.
[rms: I agree that is a desirable mode we should support somehow.
It should not be terribly hard.]
* Indent gets confused by a multiple "C" statements nested in a macro:
This line:
CHECK_ZERO(rpmsg->rip_res, tracef(" reserved fields not zero"); break );
yields these errors:
../rip.c: 115: Unbalanced parens
../rip.c: 115: Line broken
../rip.c: 115: Extra )
[rms: Code like this appears in other programs too.
For example, toplev.c in GCC. So it is important not to get too upset
when things like this appear in the input.]
Add a new option specifying how goto labels are indented.
Make it so that the line numbers indent reports are the real line
numbers (currently it is often off by a few).
Error recover should probably be enhanced. At a minimum, "indent
foo.c" should not overwrite foo.c when it gets an error. Fancy error
recover is probably not worth the effort because indent is pretty
fast. Stopping after the first error might be more helpful than the
current error cascades.
Make the -nss option cause
while (foo)
;
This is the real alternative to
while (foo) ;
Look at all the undocumented options, and determine which of them are
bug-free enough that they should be documented.
1) Is it possible to control how indent puts white space *within*
an expression? I notice that "(x*y<5)" comes out like "(x * y < 5)". Can
I configure "indent" to put spaces around "the following list of characters"
and do not put spaces around "the following list of characters"? I.E. Can
I make it put spaces around "< > + - || &&" and *not* put spaces around
"* / ^ &", etc. ?
Consider leaving the spacing between the preprocessor
# and the "if", "endif", etc. and indent that line as if it were
a regular if () in C.
Thus, given
main()
{
int x = 1, y = 1, z = 1;
if (x)
if (y)
if (z)
# ifdef FOO
printf("hello\n");
# else FOO
printf("world\n");
# endif FOO
}
main()
{
int x = 1, y = 1, z = 1;
if (x)
if (y)
if (z)
# ifdef FOO
printf("hello\n");
# else /* FOO */
printf("world\n");
# endif /* FOO */
}