[GRASS5] Jan's copyright notice ++

Hello all

After seeing Jan's new copyright message and consulting with Markus, I
took the message a step further and added a "file header block" that
should be included in all grass files (at least any new ones). I updated
Jan's copyright instructions in the SUBMITTING file so please take a
quick browse of the file for details.

If anyone has suggestions for changes or objections, then please feel
free to respond to this message.

Thank you for your time.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Justin,

the file header is as such a nice idea. But wouldn't it be possible to
get one step further and introduce something that can be processed
automated (with some documentation system or something homegrown)?
I feel it is a waste of time to re-write the headers (which are from
on-liners to several pages of prose) while we have not decided how the
future development strategy will be.

If we agree that we want the modules have internal information about
authors, version, purpose, function, title etc. this should be done in
one place/with one system.

Another question: What should be done with the old comment headers? I am
clueless if they must be preserved for license reasons or if the info
should be included into the new headers and then discarded.

cu,

Andreas

Justin Hickey wrote:

Hello all

After seeing Jan's new copyright message and consulting with Markus, I
took the message a step further and added a "file header block" that
should be included in all grass files (at least any new ones). I updated
Jan's copyright instructions in the SUBMITTING file so please take a
quick browse of the file for details.

If anyone has suggestions for changes or objections, then please feel
free to respond to this message.

Thank you for your time.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Andreas Lange wrote:

the file header is as such a nice idea. But wouldn't it be possible to
get one step further and introduce something that can be processed
automated (with some documentation system or something homegrown)?
I feel it is a waste of time to re-write the headers (which are from
on-liners to several pages of prose) while we have not decided how the
future development strategy will be.

If we agree that we want the modules have internal information about
authors, version, purpose, function, title etc. this should be done in
one place/with one system.

Andreas,

I think that there is a big difference in effort between settling on a new
style of header, and applying it to code as touched vs. implementing
auto-extractable function descriptions which would have to be applied to
all interesting functions to be of much use.

Another question: What should be done with the old comment headers? I am
clueless if they must be preserved for license reasons or if the info
should be included into the new headers and then discarded.

I presume we should try to retain information in the PURPOSE field, and
if the copyright isn't GPL, then retain the copyright information in the
COPYRIGHT field.

On the suggested format, I have a few questions.

/*
* <Id flag - see STYLE_PROGRAMMING for proper syntax>
*
****************************************************************************
* -- GRASS Development Team --
*
* MODULE: GRASS gis library

What does MODULE mean? Is this effectively the directory the files is in?
Would it be "raster" for src/raster/r.in.gdal? Please explain more fully.

* FILENAME: env.c

I hate including filenames in standard headers. It will be included in the
$Id$ after exapansion anyways, and filenames in the header that need to be
hand maintained are often not done properly, and just left with the value
copied from somewhere else. I propose this be dropped.

* AUTHOR(S): Original author unknown - probably CERL
* Justin Hickey - Bangkok Thailand - jhickey@hpcc.nectec.or.th
* Roger Bivand - rsb@reclus.nhh.no
* PURPOSE: To provide functionality for GRASS programs to set and get
* environment variables. The set environment functions can set
* variables for the duration of the program, or variables can be
* set permanently by adding them to the GISRC file. The get
* environment functions simply get the given variable from the
* environment regardless of whether it is permanent or not.
* Functions are also provided to read and write the GISRC file.
* This file has been rewritten by Justin Hickey.
* DATE CREATED: Jul 14 2000

What is the purpose of DATE CREATED? Perhaps it should be dropped.

* COPYRIGHT: (C) 2000 by the GRASS Development Team
*
* This program is free software under the GPL (>=v2)
* Read the file COPYING that comes with GRASS for details.
*
*****************************************************************************/

Beyond the above I would like to see capture of log messages automatically.
I find it enormously useful to be able to scan back through log messages (the
same messages entered on a CVS commit) when looking at source file.

The following is an example of the header style I normally use. I think the
most sigificant difference compared to the proposed style is the inclusion of
the $Log$ section to auto-generate checkin logs. Could we consider dropping
DATE CREATED and FILENAME from the existing style, and adding a $Log$ section?

/******************************************************************************
* $Id: make_loc.c,v 1.1 2000/10/31 04:39:43 frankw Exp $
*
* Project: libgrass
* Purpose: Function to create a new location automatically given a
* "Cell_head", PROJ_INFO and PROJ_UNITS information.
* Author: Frank Warmerdam, warmerda@home.com
*
******************************************************************************
* Copyright (c) 2000, Frank Warmerdam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
******************************************************************************
*
* $Log: make_loc.c,v $
* Revision 1.1 2000/10/31 04:39:43 frankw
* New
*
*/

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Frank,

i think you misunderstood me partly.
I was not thinking of auto-extractable function descriptions (like with
lclint) but only of a very simple tag for authors and copyright
statements. I think your proposal is very reasonable, but if we want
later to generate xml-desriptions for the info on the module (authors,
title, purpose of module) we have to re-write the same info again.

If we could agree on some simple concept we can avoid doubling the work.
No one will be forced to use this, esp. with the libraries the
information is not needed. This affects only the modules, where
currently the information is spread among source code, text files, old,
no longer maintained man-pages, html-files, READMEs, TODOs, howtos etc.
I believe that we can in the long run save much time if we agree on a
new, simple concept.

So i would propose to use the header you suggested for all library
files, but discuss how we can in future improve the modules concept
(again, we are not forced to implement this in every module, but if
someone reworks the code, it will be not too much work to implement
this).

cu,

Andreas

Frank Warmerdam wrote:
..

Andreas,

I think that there is a big difference in effort between settling on a new
style of header, and applying it to code as touched vs. implementing
auto-extractable function descriptions which would have to be applied to
all interesting functions to be of much use.

..

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Thu, Nov 02, 2000 at 11:32:02AM -0500, Frank Warmerdam wrote:

Andreas Lange wrote:
> the file header is as such a nice idea. But wouldn't it be possible to
> get one step further and introduce something that can be processed
> automated (with some documentation system or something homegrown)?
> I feel it is a waste of time to re-write the headers (which are from
> on-liners to several pages of prose) while we have not decided how the
> future development strategy will be.
>
> If we agree that we want the modules have internal information about
> authors, version, purpose, function, title etc. this should be done in
> one place/with one system.

Andreas,

I think that there is a big difference in effort between settling on a new
style of header, and applying it to code as touched vs. implementing
auto-extractable function descriptions which would have to be applied to
all interesting functions to be of much use.

> Another question: What should be done with the old comment headers? I am
> clueless if they must be preserved for license reasons or if the info
> should be included into the new headers and then discarded.

I presume we should try to retain information in the PURPOSE field, and
if the copyright isn't GPL, then retain the copyright information in the
COPYRIGHT field.

On the suggested format, I have a few questions.

/*
* <Id flag - see STYLE_PROGRAMMING for proper syntax>
*
****************************************************************************
* -- GRASS Development Team --
*
* MODULE: GRASS gis library

What does MODULE mean? Is this effectively the directory the files is in?
Would it be "raster" for src/raster/r.in.gdal? Please explain more fully.

For the next major release we want to get GRASS modularized. A package
"GRASS-core", "GRASS-hydrology" or something like that.
The idea of "MODULE" (I guess) might be to describe where is file is
located. On the other hand it might be redundant.

* FILENAME: env.c

I hate including filenames in standard headers. It will be included in the
$Id$ after exapansion anyways, and filenames in the header that need to be
hand maintained are often not done properly, and just left with the value
copied from somewhere else. I propose this be dropped.

I agree.

* AUTHOR(S): Original author unknown - probably CERL
* Justin Hickey - Bangkok Thailand - jhickey@hpcc.nectec.or.th
* Roger Bivand - rsb@reclus.nhh.no
* PURPOSE: To provide functionality for GRASS programs to set and get
* environment variables. The set environment functions can set
* variables for the duration of the program, or variables can be
* set permanently by adding them to the GISRC file. The get
* environment functions simply get the given variable from the
* environment regardless of whether it is permanent or not.
* Functions are also provided to read and write the GISRC file.
* This file has been rewritten by Justin Hickey.
* DATE CREATED: Jul 14 2000

What is the purpose of DATE CREATED? Perhaps it should be dropped.

Might be dropped as $Id$ is already there.

* COPYRIGHT: (C) 2000 by the GRASS Development Team
*
* This program is free software under the GPL (>=v2)
* Read the file COPYING that comes with GRASS for details.
*
*****************************************************************************/

Beyond the above I would like to see capture of log messages automatically.
I find it enormously useful to be able to scan back through log messages (the
same messages entered on a CVS commit) when looking at source file.

The problem might be that the files get longer and longer. Is there an
option to restrict the lines (aka versions) to be shown?

The following is an example of the header style I normally use. I think the
most sigificant difference compared to the proposed style is the inclusion of
the $Log$ section to auto-generate checkin logs. Could we consider dropping
DATE CREATED and FILENAME from the existing style, and adding a $Log$ section?

/******************************************************************************
* $Id: make_loc.c,v 1.1 2000/10/31 04:39:43 frankw Exp $
*
* Project: libgrass
* Purpose: Function to create a new location automatically given a
* "Cell_head", PROJ_INFO and PROJ_UNITS information.
* Author: Frank Warmerdam, warmerda@home.com
*
******************************************************************************
* Copyright (c) 2000, Frank Warmerdam
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.

.. this part is quite long and already put in grass/COPYING.
I would prefer the short version as above for the GPL stuff.

******************************************************************************
*
* $Log: make_loc.c,v $
* Revision 1.1 2000/10/31 04:39:43 frankw
* New
*
*/

Generally it's nice to have the Log here (as being helpful). Only
it's length is a question as we deal with > 18000 files
(see http://www.codecatalog.com/statsProjectFiles.html)

Regards

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Andreas Lange wrote:

Hi Frank,

i think you misunderstood me partly.
I was not thinking of auto-extractable function descriptions (like with
lclint) but only of a very simple tag for authors and copyright
statements. I think your proposal is very reasonable, but if we want
later to generate xml-desriptions for the info on the module (authors,
title, purpose of module) we have to re-write the same info again.

If we could agree on some simple concept we can avoid doubling the work.
No one will be forced to use this, esp. with the libraries the
information is not needed. This affects only the modules, where
currently the information is spread among source code, text files, old,
no longer maintained man-pages, html-files, READMEs, TODOs, howtos etc.
I believe that we can in the long run save much time if we agree on a
new, simple concept.

So i would propose to use the header you suggested for all library
files, but discuss how we can in future improve the modules concept
(again, we are not forced to implement this in every module, but if
someone reworks the code, it will be not too much work to implement
this).

Andreas,

I would agree that we shouldn't spend much time putting in purposes for
GRASS commands, since that is already addressed in the user help (in the
.html file). The duplication of author is likely not a big deal.

Beyond the above I would like to see capture of log messages automatically.
I find it enormously useful to be able to scan back through log messages (the
same messages entered on a CVS commit) when looking at source file.

Markus says:

The problem might be that the files get longer and longer. Is there an
option to restrict the lines (aka versions) to be shown?

Markus,

There is no way of instructing CVS to restrict the number of versions
inserted that i know of. Normally I just hand trim the history when I
see it getting very long. I would also suggest omitting the $Log$
from files like gisdefs.h that are likely to be updated very frequently
with additions of prototypes and so forth.

Shall we say the proposed header for library source files will be as shown
below? For grass commands the purpose might be as simple as "Mainline for
r.in.gdal" with the user documentation existing elsewhere. If a command
is split into several files, the purpose should try to address what part of
the overall work is done in that source file.

/***************************************************************************
* $Id: make_loc.c,v 1.2 2000/11/02 18:05:04 frankw Exp $
*
* MODULE: libgrass (should go into libgis)
* AUTHOR(S): Frank Warmerdam - warmerda@home.com
* PURPOSE: Function to create a new location automatically given a
* "Cell_head", PROJ_INFO and PROJ_UNITS information.
*
* COPYRIGHT: (C) 2000 by the GRASS Development Team
*
* This program is free software under the GPL (>=v2)
* Read the file COPYING that comes with GRASS for details.
*****************************************************************************
* $Log: make_loc.c,v $
* Revision 1.2 2000/11/02 18:05:04 frankw
* added G_set_cellhd_from_projinfo
*
* Revision 1.1 2000/10/31 04:39:43 frankw
* New
*/

If this is acceptable I will update the SUBMITTING file accordingly.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Thu, Nov 02, 2000 at 01:19:02PM -0500, Frank Warmerdam wrote:

Andreas Lange wrote:
>
> Hi Frank,
>
> i think you misunderstood me partly.
> I was not thinking of auto-extractable function descriptions (like with
> lclint) but only of a very simple tag for authors and copyright
> statements. I think your proposal is very reasonable, but if we want
> later to generate xml-desriptions for the info on the module (authors,
> title, purpose of module) we have to re-write the same info again.
>
> If we could agree on some simple concept we can avoid doubling the work.
> No one will be forced to use this, esp. with the libraries the
> information is not needed. This affects only the modules, where
> currently the information is spread among source code, text files, old,
> no longer maintained man-pages, html-files, READMEs, TODOs, howtos etc.
> I believe that we can in the long run save much time if we agree on a
> new, simple concept.
>
> So i would propose to use the header you suggested for all library
> files, but discuss how we can in future improve the modules concept
> (again, we are not forced to implement this in every module, but if
> someone reworks the code, it will be not too much work to implement
> this).

Andreas,

I would agree that we shouldn't spend much time putting in purposes for
GRASS commands, since that is already addressed in the user help (in the
.html file). The duplication of author is likely not a big deal.

>> Beyond the above I would like to see capture of log messages automatically.
>> I find it enormously useful to be able to scan back through log messages (the
>> same messages entered on a CVS commit) when looking at source file.

Markus says:
>The problem might be that the files get longer and longer. Is there an
>option to restrict the lines (aka versions) to be shown?

Markus,

There is no way of instructing CVS to restrict the number of versions
inserted that i know of. Normally I just hand trim the history when I
see it getting very long. I would also suggest omitting the $Log$
from files like gisdefs.h that are likely to be updated very frequently
with additions of prototypes and so forth.

I agree. And you are right, of course this list could be shortened manually
(even not a big deal).

Shall we say the proposed header for library source files will be as shown
below? For grass commands the purpose might be as simple as "Mainline for
r.in.gdal" with the user documentation existing elsewhere. If a command
is split into several files, the purpose should try to address what part of
the overall work is done in that source file.

/***************************************************************************
* $Id: make_loc.c,v 1.2 2000/11/02 18:05:04 frankw Exp $
*
* MODULE: libgrass (should go into libgis)
* AUTHOR(S): Frank Warmerdam - warmerda@home.com
* PURPOSE: Function to create a new location automatically given a
* "Cell_head", PROJ_INFO and PROJ_UNITS information.
*
* COPYRIGHT: (C) 2000 by the GRASS Development Team
*
* This program is free software under the GPL (>=v2)
* Read the file COPYING that comes with GRASS for details.
*****************************************************************************
* $Log: make_loc.c,v $
* Revision 1.2 2000/11/02 18:05:04 frankw
* added G_set_cellhd_from_projinfo
*
* Revision 1.1 2000/10/31 04:39:43 frankw
* New
*/

If this is acceptable I will update the SUBMITTING file accordingly.
From my side it's nice. I am sure, Justin will like it, too. He is

online tomorrow (time shift: 5h from here or so).

Regards

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello all

I'll try to answer everyone's concerns in this single post.

First of all, it appears people got the wrong impression about the
purpose section, mainly due to my poor choice of an example. My intended
audience for the purpose section was for programmers, not users. More
details on this are below.

Andreas

It might just be me, but I don't think I understand your proposal. Where
is the information stored, in XML files? And how does it get inserted
into the source file? But I agree that if there is a possibility of
having effort duplicated, then a system should be developed to avoid
this. My main concern is that this information appears in the source
file, for easy access by other programmers trying to make changes.

Frank Warmerdam wrote:

I would agree that we shouldn't spend much time putting in purposes
for GRASS commands, since that is already addressed in the user help
(in the .html file).

The reason I want the purpose in the file header is to give an
indication of what the code in the file does. This information is mainly
for the programmer, not the user. Although it can contain information
pertinent to users, it should also contain information that a programmer
needs to help him/her determine what the code does in order to make
changes to the code. One of my biggest frustrations with Grass
programming is trying to figure out what code does. I realize that most
programmers do not comment code to the extent that I do (most of my
source files have more lines of comments than lines of code :), so I was
trying to come up with a way to minimize this frustration in the future
that would not be too inconvenient to other programmers.

Reading my example again, I see that the PURPOSE statement is not a good
reflection of what I intended. That's because it was taken from a file I
created which contains much more information throughout the file (I even
have a header for each function). Sorry, bad choice on my part :(.
Anyway, I was thinking the purpose section would be very useful in
modules like v.digit which contains many source files. Obviously, the
purpose sections of most of those files would not contain information
that would be included in a manual page (html file), but could assist
programmers that want to add a new feature or something. Possibly making
it easier to determine which files need to be changed.

There is no way of instructing CVS to restrict the number of versions
inserted that i know of. Normally I just hand trim the history when I
see it getting very long. I would also suggest omitting the $Log$
from files like gisdefs.h that are likely to be updated very
frequently with additions of prototypes and so forth.

The log idea is a good one, but my only problem is your suggestion to
not include it in some files. The problem is how do we determine which
files should not include it. There should be a systematic way to
determine this but I can't see how it could be done systematically.

I would suggest that the log tag be included in every file for
consistency sake and then if a programmer finds the log entries section
too long, they are free to delete some of the earlier ones. But we
should also limit the number of deletions. For example, we might say
that if you delete log entries you must leave at least the last 10
entries or some other number we can agree on. What do you think?

Shall we say the proposed header for library source files will be as
shown below?

Yes, your example is fine. I agree that the sections you dropped are
redundant with CVS.

For grass commands the purpose might be as simple as
"Mainline for r.in.gdal" with the user documentation existing
elsewhere. If a command is split into several files, the purpose
should try to address what part of the overall work is done in that
source file.

Just to add to what I said above, I would also suggest that we should
encourage programmers to fill in the details of their work in this
section, especially if they do not like putting many comments throughout
their code. I am not suggesting that programmers include all the details
of the code, only a general overview so that other programmers can get a
feel for what the code is trying to do before they tackle the code.
Perhaps an Executive Summary of a report would be a good analogy. Even I
have not been creating very relevent purpose sections, as indicated by
my example, but after reading the comments in this thread, I think such
a code overview would be useful for helping programmers determine what
the code does.

> What does MODULE mean? Is this effectively the directory the files
> is in? Would it be "raster" for src/raster/r.in.gdal? Please
> explain more fully.
For the next major release we want to get GRASS modularized. A package
"GRASS-core", "GRASS-hydrology" or something like that.
The idea of "MODULE" (I guess) might be to describe where is file is
located. On the other hand it might be redundant.

This section I mainly use for hard copies. When I have code in different
libraries and modules, I find it easy to sort and find the different
hard copies with this information at the top. BTW, for
src/raster/r.in.gdal it would have been r.in.gdal. However, Markus has a
good point. In the new structure, it may be useful to note which part of
the new system the file belongs to (GRASS-core, GRASS-hydrology, etc).
It is fine with me if you want to drop it though.

I think I covered everything but if I missed something then please feel
free to point it out.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Justin, hi all,

thank you very much for your comments. I am sorry that i was not clear
about my proposal, i fear that this was only understandable with
knowledge from some personal communication with Markus and Jan-Oliver.
As it will not be possible to add my idea in GRASS5.0stable i will
postpone this. In outline: I want to add a function G_define_module() to
the parser that allows to define title, author, version and a short
description of the module from within the module. This would allow to
add author(s), title, version and the description to the xml output with
--interface-description. This information is then usable for the GUI
(window title, description, help system, searching for keywords), with
G_usage() output and could be processed for automatic generation of the
html-index-pages. This all would be a part of "modularization" of GRASS
and help keeping all information in one place (e. g. from source header,
tcltkgrass-modules-files, html-index-pages, etc). But i don't know if it
is realistically possible to include this in all modules.

You are right that for big parts of the GRASS code there is not much
documentation of how and why something is done the way it is. I am
frustrated, too, by the lack of comments and sometimes obscure
programming style (this was ok as long as GRASS was maintained within
CERL). There are large parts of code for which there is not even
documentation in the programmers handbook (some R_* functions, whole
XDRIVER/fifos stuff).

I agree with the header structure as it is now. I have only one
additional question: What should be written for AUTHOR(S) for code where
the author is not known? We should define something here.

Another concern are the log messages. If i do a back envelope
calculation here: we have over 300 modules, if every module consists of
average 3 files and we add 10 lines to each, we get additional 9000
lines of code to store in CVS. As we add the log messages to the
libraries and add the header with further 10 lines, we should calculate
to add about 20.000 or 30.000 lines to the code in the long run. Will
this cause any problems? I simply don't know. The log messages could be
generated from CVS, so it would be less convinient to the programmer if
we do not store them with the source files.

cu,
Andreas

Justin Hickey wrote:

Hello all

I'll try to answer everyone's concerns in this single post.

First of all, it appears people got the wrong impression about the
purpose section, mainly due to my poor choice of an example. My intended
audience for the purpose section was for programmers, not users. More
details on this are below.

Andreas

It might just be me, but I don't think I understand your proposal. Where
is the information stored, in XML files? And how does it get inserted
into the source file? But I agree that if there is a possibility of
having effort duplicated, then a system should be developed to avoid
this. My main concern is that this information appears in the source
file, for easy access by other programmers trying to make changes.

Frank Warmerdam wrote:
> I would agree that we shouldn't spend much time putting in purposes
> for GRASS commands, since that is already addressed in the user help
> (in the .html file).

The reason I want the purpose in the file header is to give an
indication of what the code in the file does. This information is mainly
for the programmer, not the user. Although it can contain information
pertinent to users, it should also contain information that a programmer
needs to help him/her determine what the code does in order to make
changes to the code. One of my biggest frustrations with Grass
programming is trying to figure out what code does. I realize that most
programmers do not comment code to the extent that I do (most of my
source files have more lines of comments than lines of code :), so I was
trying to come up with a way to minimize this frustration in the future
that would not be too inconvenient to other programmers.

Reading my example again, I see that the PURPOSE statement is not a good
reflection of what I intended. That's because it was taken from a file I
created which contains much more information throughout the file (I even
have a header for each function). Sorry, bad choice on my part :(.
Anyway, I was thinking the purpose section would be very useful in
modules like v.digit which contains many source files. Obviously, the
purpose sections of most of those files would not contain information
that would be included in a manual page (html file), but could assist
programmers that want to add a new feature or something. Possibly making
it easier to determine which files need to be changed.

> There is no way of instructing CVS to restrict the number of versions
> inserted that i know of. Normally I just hand trim the history when I
> see it getting very long. I would also suggest omitting the $Log$
> from files like gisdefs.h that are likely to be updated very
> frequently with additions of prototypes and so forth.

The log idea is a good one, but my only problem is your suggestion to
not include it in some files. The problem is how do we determine which
files should not include it. There should be a systematic way to
determine this but I can't see how it could be done systematically.

I would suggest that the log tag be included in every file for
consistency sake and then if a programmer finds the log entries section
too long, they are free to delete some of the earlier ones. But we
should also limit the number of deletions. For example, we might say
that if you delete log entries you must leave at least the last 10
entries or some other number we can agree on. What do you think?

> Shall we say the proposed header for library source files will be as
> shown below?

Yes, your example is fine. I agree that the sections you dropped are
redundant with CVS.

> For grass commands the purpose might be as simple as
> "Mainline for r.in.gdal" with the user documentation existing
> elsewhere. If a command is split into several files, the purpose
> should try to address what part of the overall work is done in that
> source file.

Just to add to what I said above, I would also suggest that we should
encourage programmers to fill in the details of their work in this
section, especially if they do not like putting many comments throughout
their code. I am not suggesting that programmers include all the details
of the code, only a general overview so that other programmers can get a
feel for what the code is trying to do before they tackle the code.
Perhaps an Executive Summary of a report would be a good analogy. Even I
have not been creating very relevent purpose sections, as indicated by
my example, but after reading the comments in this thread, I think such
a code overview would be useful for helping programmers determine what
the code does.

> > What does MODULE mean? Is this effectively the directory the files
> > is in? Would it be "raster" for src/raster/r.in.gdal? Please
> > explain more fully.
> For the next major release we want to get GRASS modularized. A package
> "GRASS-core", "GRASS-hydrology" or something like that.
> The idea of "MODULE" (I guess) might be to describe where is file is
> located. On the other hand it might be redundant.

This section I mainly use for hard copies. When I have code in different
libraries and modules, I find it easy to sort and find the different
hard copies with this information at the top. BTW, for
src/raster/r.in.gdal it would have been r.in.gdal. However, Markus has a
good point. In the new structure, it may be useful to note which part of
the new system the file belongs to (GRASS-core, GRASS-hydrology, etc).
It is fine with me if you want to drop it though.

I think I covered everything but if I missed something then please feel
free to point it out.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Andreas, and all

I was waiting for a reply from Frank but he must be busy or something,
thus the late reply.

Andreas Lange wrote:

Hi Justin, hi all,

thank you very much for your comments. I am sorry that i was not clear
about my proposal, i fear that this was only understandable with
knowledge from some personal communication with Markus and Jan-Oliver.
As it will not be possible to add my idea in GRASS5.0stable i will
postpone this. In outline: I want to add a function G_define_module()
to the parser that allows to define title, author, version and a short
description of the module from within the module. This would allow to
add author(s), title, version and the description to the xml output
with --interface-description. This information is then usable for the
GUI (window title, description, help system, searching for keywords),
with G_usage() output and could be processed for automatic generation
of the html-index-pages. This all would be a part of "modularization"
of GRASS and help keeping all information in one place (e. g. from
source header, tcltkgrass-modules-files, html-index-pages, etc). But i
don't know if it is realistically possible to include this in all
modules.

Ahh, OK I understand now, it is a system for storing information at the
module level. I don't know how this would work on the file level though.
For example, in a large module, there could be several authors with each
author responsible for different files. Thus the module level
information should include all authors, but the file level information
should only include the authors for that file.

It seems that the file level information will be different than the
module level information, but perhaps your system can get the author
names from the file. I'm not sure, it's just a suggestion.

I agree with the header structure as it is now. I have only one
additional question: What should be written for AUTHOR(S) for code
where the author is not known? We should define something here.

I have started to put something like the following for code I have
changed or rewritten:

* AUTHOR(S): Original author unknown - probably CERL
* Justin Hickey - jhickey@hpcc.nectec.or.th

I think that is about the best we can do. If the original author is
determined then it can be changed.

Another concern are the log messages. If i do a back envelope
calculation here: we have over 300 modules, if every module consists
of average 3 files and we add 10 lines to each, we get additional 9000
lines of code to store in CVS. As we add the log messages to the
libraries and add the header with further 10 lines, we should
calculate to add about 20.000 or 30.000 lines to the code in the long
run. Will this cause any problems? I simply don't know. The log
messages could be generated from CVS, so it would be less convinient
to the programmer if we do not store them with the source files.

Personally, I don't have any concerns about whether the log messages
should be included or not. However, since CVS can handle grass (as big
as it currently is) I don't think the added lines of code will cause any
problems. But you have a point about the logs being available through
CVS.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Justin,

thank you for your patience. I think all questions are answered now.

..

Ahh, OK I understand now, it is a system for storing information at the
module level. I don't know how this would work on the file level though.
For example, in a large module, there could be several authors with each
author responsible for different files. Thus the module level
information should include all authors, but the file level information
should only include the authors for that file.

It seems that the file level information will be different than the
module level information, but perhaps your system can get the author
names from the file. I'm not sure, it's just a suggestion.

The information will be partly different, but from my expirience the
header from the main.c file of the module should have the needed info
for the module. Perhaps i can construct something with a script to
extract this info.

Personally, I don't have any concerns about whether the log messages
should be included or not. However, since CVS can handle grass (as big
as it currently is) I don't think the added lines of code will cause any
problems. But you have a point about the logs being available through
CVS.

OK. This is maybe a non-issue with constantly falling prices for
harddisks and increasing network bandwidth.

cu,

Andreas

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello all

Andreas Lange wrote:

thank you for your patience. I think all questions are answered now.

OK, then since Frank seems to be busy, I'll update the SUBMITTING file
the way he proposed earlier.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Justin Hickey wrote:

Hello all

Andreas Lange wrote:
> thank you for your patience. I think all questions are answered now.

OK, then since Frank seems to be busy, I'll update the SUBMITTING file
the way he proposed earlier.

Heh! Now I do have a concern with the log messages being used in the
header. While looking into the use of the $Log$ keyword in the document
"Version Management with CVS" by Per Cederqvist et al, I came across the
following warning in section 12.5 "Problems with the $Log$ keyword"

=================== Begin Text =======================================

The $Log$ keyword is somewhat controversial. As long as you are working
on your development system the information is easily accessible even if
you do not use the $Log$ keyword -- just do a cvs log. Once you export
the file the history information might be useless anyhow.

A more serious concern is that CVS is not good at handling $Log$ entries
when a branch is merged onto the main trunk. Conflicts often result from
the merging operation.

People also tend to "fix" the log entries in the file (correcting
spelling mistakes and maybe even factual errors). If that is done the
information from cvs log will not be consistent with the information
inside the file. This may or may not be a problem in real life.

It has been suggested that the $Log$ keyword should be inserted last in
the file, and not in the files header, if it is to be used at all. That
way the long list of change messages will not interfere with everyday
source file browsing.

=================== End Text =======================================

What concerns me is the second paragraph concerning the conflicts that
can result from a merge operation. Since we are about to create a new
branch that will eventually be merged back in, then I think we need to
take this problem into consideration.

Without any experience with this problem, I would recommend that we do
not use the $Log$ keyword to avoid what could be major headaches in the
future given the size of Grass. Am I being paranoid? What do people
think?

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi all,

On Fri, Nov 10, 2000 at 11:03:13AM +0700, Justin Hickey wrote:

Justin Hickey wrote:
>
> Hello all
>
> Andreas Lange wrote:
> > thank you for your patience. I think all questions are answered now.
>
> OK, then since Frank seems to be busy, I'll update the SUBMITTING file
> the way he proposed earlier.

Heh! Now I do have a concern with the log messages being used in the
header. While looking into the use of the $Log$ keyword in the document
"Version Management with CVS" by Per Cederqvist et al, I came across the
following warning in section 12.5 "Problems with the $Log$ keyword"

[...]

What concerns me is the second paragraph concerning the conflicts that
can result from a merge operation. Since we are about to create a new
branch that will eventually be merged back in, then I think we need to
take this problem into consideration.

Without any experience with this problem, I would recommend that we do
not use the $Log$ keyword to avoid what could be major headaches in the
future given the size of Grass. Am I being paranoid? What do people
think?

Justin, this is a very important concern! I agree that we could get
many problems especially from code merging.
There must be a cvs command to get the Log for a specific file (just
can't find my CVS book). Like that we could read the log without
putting it into the code. I would prefer the $Id$.

Regards

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Fri, Nov 10, 2000 at 06:30:52PM +0000, Markus Neteler wrote:

> Without any experience with this problem, I would recommend that we do
> not use the $Log$ keyword to avoid what could be major headaches in the
> future given the size of Grass. Am I being paranoid? What do people
> think?

Justin, this is a very important concern! I agree that we could get
many problems especially from code merging.
There must be a cvs command to get the Log for a specific file (just
can't find my CVS book). Like that we could read the log without
putting it into the code. I would prefer the $Id$.

There's a perl script called 'cvs2cl' which generates a ChangeLog file.
I don't know much about it, but it may be an appropriate tool.

--
#! /bin/sh
# ppp-address: What's my Internet Address for ppp0 ?
/sbin/ifconfig ppp0 2> /dev/null | grep 'inet addr:' | sed \
's=.*inet addr\:\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*=\1='

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Markus Neteler wrote:

Justin, this is a very important concern! I agree that we could get
many problems especially from code merging.
There must be a cvs command to get the Log for a specific file (just
can't find my CVS book). Like that we could read the log without
putting it into the code. I would prefer the $Id$.

Justin / Markus, et al,

I am not sure what merge problems the documents referred to. I haven't
ever encountered them, but then I don't make heavy use of merging branches
back into mainline code bases. Are we intending to do this in GRASS?

I have used the $Log$ method in the two million lines of code I managed at PCI
with few ill effects. There is indeed a commands to get old cvs log messages
out of CVS ("cvs log <filename>"); however, it isn't very convenient, and
people just getting tar files of source have no access to it. It has been
my finding that I (and many other developers) will take a few seconds to
scan the last few log messages when a problem is encountered _if_ they are
at the top of the file and easy to scan. This has helped me out quite a bit
over the last decade or so.

However, it isn't critical.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

So, I got the ./configure thing working properly, and after issuing a “make install”, most of it seems to look good initially, but then I started to notice a lot of “make” errors. It complains about “/usr/bin/ld: can’t locate file for: -lm”.

I do not understand what the -lm switch does, and why it can’t locate the file it needs.

By the way, I am not using CVS because I cannot get PPP working on the MacOS X machine…

If I get this part working, I think we will soon have MacOS X binaries!!

Heres a the shell output of a typical module:

#################################################################
/Users/jeshua/grass5/src/display/d.rast.arrow
mkdir OBJ.powerpc-apple-bsd
make -f OBJ.powerpc-apple-bsd/make.rules

rm -f OBJ.powerpc-apple-bsd/arrow.o
cc -g -O2 -I/Users/jeshua/grass5/src/include -c arrow.c
mv arrow.o OBJ.powerpc-apple-bsd/arrow.o
cc -o /usr/local/grass-5.0b/etc/bin/main/cmd/d.rast.arrow OBJ.powerpc-apple-bsd/arrow.o /Users/jeshua/grass5/src/libes/LIB.powerpc-apple-bsd/libdisplay.a /Users/jeshua/grass5/src/libes/LIB.powerpc-apple-bsd/libraster.a /Users/jeshua/grass5/src/libes/LIB.powerpc-apple-bsd/libgis.a -lm
/usr/bin/ld: can’t locate file for: -lm
make[1]: *** [/usr/local/grass-5.0b/etc/bin/main/cmd/d.rast.arrow] Error 1
GISGEN failure at STEP: src/display/d.rast.arrow

GISGEN: src/display/d.rast.edit - Fri Nov 10 18:48:52 PST 2000

#################################################################

Thanks!

Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481

The linker is looking for the standard floating point math
library, either libm.so or libm.a, probably in /lib or /usr/lib.
It's possible that macosx doesn't require linking against the
math library, some platforms don't. You'll have to tweak the
CMD/head/head file to remove -lm from your linker switches.
Just search for "-lm", delete it, and see if programs start
linking properly.

Jeshua Lacock wrote:

So, I got the ./configure thing working properly, and after issuing a "make install", most of it
seems to look good initially, but then I started to notice a lot of "make" errors. It complains
about "/usr/bin/ld: can't locate file for: -lm".

I do not understand what the -lm switch does, and why it can't locate the file it needs.

By the way, I am not using CVS because I cannot get PPP working on the MacOS X machine....

If I get this part working, I think we will soon have MacOS X binaries!!

Heres a the shell output of a typical module:

#################################################################
/Users/jeshua/grass5/src/display/d.rast.arrow
  mkdir OBJ.powerpc-apple-bsd
  make -f OBJ.powerpc-apple-bsd/make.rules

rm -f OBJ.powerpc-apple-bsd/arrow.o
cc -g -O2 -I/Users/jeshua/grass5/src/include -c arrow.c
mv arrow.o OBJ.powerpc-apple-bsd/arrow.o
cc -o /usr/local/grass-5.0b/etc/bin/main/cmd/d.rast.arrow OBJ.powerpc-apple-bsd/arrow.o
/Users/jeshua/grass5/src/libes/LIB.powerpc-apple-bsd/libdisplay.a
/Users/jeshua/grass5/src/libes/LIB.powerpc-apple-bsd/libraster.a
/Users/jeshua/grass5/src/libes/LIB.powerpc-apple-bsd/libgis.a -lm
/usr/bin/ld: can't locate file for: -lm
make[1]: *** [/usr/local/grass-5.0b/etc/bin/main/cmd/d.rast.arrow] Error 1
GISGEN failure at STEP: src/display/d.rast.arrow

GISGEN: src/display/d.rast.edit - Fri Nov 10 18:48:52 PST 2000

#################################################################

Thanks!
--
Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481

--
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
| Eric B. Mitchell mailto:emitchell@altaira.com |
| tel: (301) 809 - 3534 Altair Aerospace Corporation |
| tel: (800) 7 - ALTAIR 4201 Northview Dr. Suite 410 |
| fax: (301) 805 - 8122 Bowie, MD 20716 |
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
              ,___
          /"\ / o=\ /"""---===/
         / \_/ \__/ ---===/
         | //\ || /""TT""/ //\ || ||""\
         | // \ || || // \ || ||__/
         | //--==\ |L--/ || //--==\ || || "=,
          \ ---===/
           \____---===/

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Jeshua,

On Fri, Nov 10, 2000 at 08:24:50PM -0800, Jeshua Lacock wrote:
[...]

By the way, I am not using CVS because I cannot get PPP working on
the MacOS X machine....

If you are interested, I can package the CVS sources for you.
Then you don't miss many new features and bugfixes.

Hi all:
In fact I plan to implement "CVS snapshots" on our SUN.
Shall I implement daily or weekly snapshots? Due to the
package size and network traffic I would prefer weekly
snapshots. Maybe mondays would be good (to get in all
improvements from weekends :slight_smile:

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Fri, Nov 10, 2000 at 10:31:23AM -0800, Eric G . Miller wrote:

On Fri, Nov 10, 2000 at 06:30:52PM +0000, Markus Neteler wrote:
> > Without any experience with this problem, I would recommend that we do
> > not use the $Log$ keyword to avoid what could be major headaches in the
> > future given the size of Grass. Am I being paranoid? What do people
> > think?
>
> Justin, this is a very important concern! I agree that we could get
> many problems especially from code merging.
> There must be a cvs command to get the Log for a specific file (just
> can't find my CVS book). Like that we could read the log without
> putting it into the code. I would prefer the $Id$.

There's a perl script called 'cvs2cl' which generates a ChangeLog file.
I don't know much about it, but it may be an appropriate tool.

Thanks for that info. I always used it for the entire CVS (taking much
time), but it also works with single files:

cvs2cl.pl r.in.bin.html
-> ChangeLog

It's available here:
# cvs2cl.pl creates a GNU style ChangeLog file:
# http://www.red-bean.com/~kfogel/cvs2cl.shtml

The command
cvs log r.in.bin.html
outputs to stdout instead of generating a file.

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'