[GRASS5] PATCH: lib/ogsf
Markus Neteler
neteler at itc.it
Thu Jul 28 06:16:07 EDT 2005
On Thu, Jul 28, 2005 at 03:08:21AM -0700, Brad Douglas wrote:
> On Thu, 2005-07-28 at 11:27 +0200, Markus Neteler wrote:
> > On Thu, Jul 28, 2005 at 01:39:31AM -0700, Brad Douglas wrote:
> > > Attached is a cleanup of a few files in lib/ogsf. I have removed some
> > > unused functions that shouldn't be necessary in trans.c. Let me know if
> > > I have erroneously removed functions (is there a possibility of homebrew
> > > modules calling these library functions?).
> >
> > Brad,
> >
> > here
> > http://mpa.itc.it/markus/tmp/grass.cln
> >
> > you find a clone analysis of GRASS 5 (done by Prof Antoniol from RCOST, Benevento,
> > Italy). It appears that
>
> Maybe I'm working too late, but I don't quite understand what the file
> represents. If you could clarify, I would greatly appreciate it.
Sure: perhaps it's easiest to read this thread:
http://grass.itc.it/pipermail/grass5/2002-March/004674.html
In short:
"Prof. Antoniol was so kind to start a first try on
GRASS clone detection. A clone is considered as a piece of code
which is very similar to another piece of code (poor man's definition).
If a clone appears several times, it should become a library
function to simplify the maintenance."
The thread contains some further comments. If I recall correctly
the numbers tell the similarity between code pieces. Note that
code can be identical even if the text formatting is different.
Also in this case identical code in different code sections can
be considered as clone. From the indicated file above you can see
that according to software measures for example the P_... functions
appear at least twice in GRASS. From that, and knowing that s4gd
was the old visualization module in GRASS 4, I derived the posted
information that the P_..() functions were copied from s4gd to
ogsf while you already discovered that they are not used (any more).
Overall this seems to confirm that the indicated P_..() functions
are obsolete. We'll see if someone with homebrew software cries
in the next days, but it's rather unlikely in this case.
Hope this clarifies it a bit
Markus
More information about the grass-dev
mailing list