[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev patch - "JUSTIFY"
From: |
T.E.Dickey |
Subject: |
Re: lynx-dev patch - "JUSTIFY" |
Date: |
Wed, 14 Jul 1999 14:44:54 -0400 (EDT) |
> I realize this is a religious issue, but what I found most difficult about
> reading the Lynx code is the brace style.
>
> There are many different ways of implementing the following (and I realize I
> do it differently from others, but will conform to slightly different
> styles when dealing with other people's code), but simply matching up
> paired curly brackets would help readability a lot.
>
> if (LYNoCore) {
> exit(-1);
> }
where _don't_ they match? I have some simple checks that I run periodically
to find stuff like
#if foo
if (x) {
#else
if (y) {
#endif
and I replace those with
#if foo
if (x)
#else
if (y)
#endif
{
so I can use the curly-brace matching in the editor. But it's a simple
check, so I can miss some cases.
(I'm reluctant to use 'indent' on Lynx because it doesn't handle ifdef'd
code very well -- occasionally corrupts the source, nor does it nicely line
up sequential assignments - and that would lead to working on yet another
program).
> that's a very very small example, and obviously is readable. But in
> some of those switch statements within switch statements, it's basically
> impossible to figure out where the heck you are, mostly because of not
> being able to simply match scopes vertically via opening and closing curly
> brackets.
vi (and clones) all can match curly braces with the '%' command. I understand
emacs has something equivalent.
--
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey
- Re: lynx-dev patch, (continued)
- Re: lynx-dev patch, David Woolley, 1999/07/13
- Re: lynx-dev patch, Vlad Harchev, 1999/07/13
- Re: lynx-dev patch - "JUSTIFY", Klaus Weide, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Vlad Harchev, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Klaus Weide, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Vlad Harchev, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", Philip Webb, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", mattack, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY",
T.E.Dickey <=
- Re: lynx-dev patch - "JUSTIFY", mattack, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", T.E.Dickey, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", David Combs, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", mattack, 1999/07/14
- Re: lynx-dev patch - "JUSTIFY", David Combs, 1999/07/15
- Re: lynx-dev patch - "JUSTIFY", Peter Wright, 1999/07/15
- lynx-dev code indentation style (was "JUSTIFY") - warning, "religious" topic..., Klaus Weide, 1999/07/14
- lynx-dev change to status line, Eduardo Chappa L., 1999/07/14
- Re: lynx-dev change to status line, Klaus Weide, 1999/07/14
- Re: lynx-dev change to status line, Eduardo Chappa L., 1999/07/15