lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Dead code removal (was: Re: why not --disable-news)


From: Kim DeVaughn
Subject: lynx-dev Dead code removal (was: Re: why not --disable-news)
Date: Mon, 8 Mar 1999 05:46:03 -0800

[OK ... Subject: changed :-) ]

On Mon, Mar 08, 1999, John Bley (address@hidden) said:
|
| On Sun, 7 Mar 1999, Kim DeVaughn wrote:
| >
| > | Meanwhile, I'm busy investigating dead code and have a question: Are all
| > | these empty HText_* functions here for any particular reason?  Nothing's
| > | even calling into them.  There are even several non-empty HText_
| > | functions that aren't ever getting called.
| >
| > Which ones ...?
|
| HText_canScrollUp for example.  HText_dump, HText_nodeAnchor.  There are
| about a dozen or so of these.  Plus one LY method.. something to do with
| image maps.  I should quit throwing away experimental files.
|
| > Are you sure they're not called (some are called from code in the
| > WWW/Lbrary/Implementations dir, BTW)?
|
| A grep HText_dump `find .` in the top-level dir yields (space truncated):
| src/GridText.c:PUBLIC void HText_dump ARGS1(
| WWW/Library/Implementation/HText.h:#define HText_dump HTHTDump
| WWW/Library/Implementation/HText.h:extern void HText_dump PARAMS((HText*me))
|
| I.e., the definition, a name-shortening #define, and a declaration of its
| existence.  No call.  This example is typical of the rest.  I'll try to
| track down the complete list sometime soon.  Perhaps Tuesday.

Be sure to check on the short names for usage, as well.

Also, as Tom pointed out, some fn()'s are called in obscure and circuitous
ways.  I dunno if lynx ever calls fn()'s through pointers, but that is one
other thing to lookout for.

In short ... caveat emptor.

Also, how much in the way of object size would removing these potentially
useful fn()'s save, if in fact they really are unreferenced?  For the sake
of "completeness" (by some metric), it may be better to leave them in.

/kim

reply via email to

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