struct strScript confusion

Alastair Reid alastair@reid-consulting-uk.ltd.uk
Tue, 5 Aug 2003 15:56:19 +0100


While applying my global C inliner to Hugs code, I got a (legitimate) warning 
that struct strScript has different definitions in script.c:39 and 
storage.c:1605.

As far as C compilers are concerned, there's nothing wrong with this but it 
seems like a needless source of confusion for programmers.  Two renamings 
suggest themselves:

1) The definition of strScript in storage.c is really concerned with modules 
so it should be called strModule (and associated functions renamed 
consistently).

  But, there is already a strModule. It seems that strScript could be inlined 
into strModule but it's a fairly major change.

2) script.c is concerned with files, modification dates of files, etc. so we 
could change strScript to strFile.  For consistency, we might rename some of 
the functions from that module too - but that's a more major change.

Or we can leave Hugs as it is.  I've sifted through warnings produced on a 
range of SPEC benchmarks and I'd say that Hugs is better constructed than 
most open source code out there.

--
Alastair Reid