[GRASS-dev] r.flow and reference information

Hallo,
while rewriting some modules, so that they use G_message and G_warning
    instead of fprinf, i found, that r.flow prints reference information
    to standard error.

i think, this option (-h) should be removed, because of this information
can be found in the manual page (or should be).

so i suggets

+ G_warning(_("For reference information see manual page. This option will be removed"));

- fprintf(stderr, "\n");
- fprintf(stderr, "Version: GRASS5.0, update: October 1999\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "Authors: original program: J. Hofierka, M.
-Zlocha, H. Mitasova, L. Mitas\n");
- fprintf(stderr, " new GRASS implementation: J. Caplan, M.
-Ruesink\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "Methods used in this program are described in the
-following papers:\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "Mitasova, H., and Hofierka, L., 1993\n");
- fprintf(stderr, "Interpolation by Regularized Spline with
-Tension:\n");
- fprintf(stderr, "II. Application to terrain modeling and surface
-geometry analysis.\n");
- fprintf(stderr, "Mathematical Geology 25, 657-669.\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "Mitasova, H., Mitas, L., Brown, W.M., Gerdes,
-D.P., Kosinovsky, I.,\n");
- fprintf(stderr, "Baker, T., 1995, Modeling spatially and
-temporally\n");
- fprintf(stderr, "distributed phenomena: New methods and tools for
-GRASS GIS.\n");
- fprintf(stderr, "Int. Journal of Geographic Information Systems
-9(4), 433-446.\n");
- fprintf(stderr, "(special issue on Integration of GIS and
-Environmental Modeling)\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "H. Mitasova, J. Hofierka, M. Zlocha, L.R.
-Iverson, 1996,\n");
- fprintf(stderr, "Modeling topographic potential for erosion and
-deposition using GIS.\n");
- fprintf(stderr, "Int. Journal of GIS, 629-641.\n");
- fprintf(stderr, "\n");
- fprintf(stderr, "The postscript versions of these papers are
-available via Internet at\n");
- fprintf(stderr,
-"http://www2.gis.uiuc.edu:2280/modviz/papers/listsj.html\\n"\);
- fprintf(stderr, "\n");
- fprintf(stderr, "Please cite these references in publications
-where the results of this\n");
- fprintf(stderr, "program are used.\n");
- fprintf(stderr, "\n");

what do you think?

thanks

Jachym

--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
Department of Geoinformation Technologies
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky@node.mendelu.cz
URL: http://mapserver.mendelu.cz
Tel.: +420 545 134 514

Jachym Cepicky wrote:

while rewriting some modules, so that they use G_message and G_warning
    instead of fprinf, i found, that r.flow prints reference information
    to standard error.

i think, this option (-h) should be removed, because of this information
can be found in the manual page (or should be).

so i suggets

+ G_warning(_("For reference information see manual page. This option will be removed"));

what do you think?

Seems reasonable enough.

FWIW, if the information was to be retained, fprintf() (or fputs())
would be the correct approach, although it should be a single call
rather than one per line.

Note that the C preprocessor concatenates adjacent string literals, so
large chunks of text can be split into lines like so:

  fprintf(stderr,
    "\n"
    "Version: GRASS5.0, update: October 1999\n"
    "\n"
[snip]
    "Please cite these references in publications where the results of this\n"
    "program are used.\n"
    "\n"
  );

without having to use a separate function call for each line.

--
Glynn Clements <glynn@gclements.plus.com>