[Top][All Lists]

[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) {
                if (y) {

and I replace those with

        #if foo
                if (x)
                if (y)

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

> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]