[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev cleaning up lynx

From: John E. Davis
Subject: lynx-dev cleaning up lynx
Date: Mon, 27 Apr 1998 02:27:50 -0400

I took a look at several of the lynx source files tonight hoping to
find something that could be cleaned up with not too much effort.  In
particular, I was hoping to break up some of those several thousand
line functions into manageable chunks.  In the end, I decided that I
am not even going to attempt this unless the global variables are
renamed in such a way that it is immediately obvious what is global
(declared outside a function) and what is local.  For example, it
appears that `more' is a global variable but `show_help' is local.  Is
there any interest in renaming all global variables in such a way that
they may be immediately distinguished from local variables?  For
example, `more' would become `Lynx_More' or something like that.
Unless this first step is taken, I just cannot imagine how one would
ever untangle some of these functions.

While I am at it, I would recommend that if any new feature or code
enhancement gets implemented and if that feature requires over 5 lines
of code, then it be placed in a separate function.  There is no excuse
for a 4000 line function.

I am really serious about cleaning up lynx because I fear that it is
going to collapse under its own weight.


reply via email to

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