[Top][All Lists]

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

Re: source cleansing (step 1)

From: James Dein
Subject: Re: source cleansing (step 1)
Date: Thu, 7 Aug 2003 21:06:44 -0700

Just to remind y'all that I am working on a reorg of .../lib/dg.exp to support multiple source file compiler tests. In fact, I just finished the "onestep" feature (compile several source files in one step to a single output file), but there is more to do and more testing to do before I submit the work. Needless to say, I am working on the .../gcc/testsuite/lib/*.exp stuff as well.

I will also be modifying .../lib/target.exp.

In the parst of the code that I "touch", I am:
- deleting superfluous `;'s
- deleting superfluous backslashes in regular expressions
- staging re's with `set ws "\[ \t]+" and the like for readibility
- editing, adding, completing, comment fields
- substituting arrays for lists where appropriate (in a limited way)
- factoring code
- initializing lists with: set mylist [list] instead of with "", for clarity - changing names of variables if necessary to reduce confusion. For example, dg-messages (a list) should be changed to dg_test_info (an array) and dg-do-what also needs to be transformed.

Unfortunately, for now, I only have time to clean up the part of the code that I actually need to modify. Also, some variables use `-'s and others use `_'s, but I have not tried to regularize the usage, except, of course, that limitations in Tcl (see Ousterhout, p. 46).

On Wednesday, August 6, 2003, at 8:49 PM, Ben Elliston wrote:

I have just committed a pervasive clean-up patch to the source tree
that removes all trailing semicolons like so:

        return 0;

Of course, script lines do not require terminating semicolons in Tcl
and keeping them there is both untidy and encourages less experienced
Tcl programmers to continue this practice in the DejaGnu sources.

The change was mechanised with a sed script and I scanned the diffs
for correctness.  The change is surrounded by a pair of tags in CVS
for good measure.


DejaGnu mailing list

reply via email to

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