[GRASS-dev] r.example question

Greetings all

In r.example this is performed
    /* G_open_cell_old - returns file destriptor (>0) */
    if ((infd = G_open_cell_old(name, mapset)) < 0)
    G_fatal_error(_("Unable to open raster map <%s>"), name);

Does this means that r.example only reads integer maps? I'm asking this because in GRASS manual, G_open_cell_old is described as:

Open an existing integer raster map (cell).

THanks

Best regards
Antonio

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4639 (20091126) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

António Rocha wrote:

In r.example this is performed
    /* G_open_cell_old - returns file destriptor (>0) */
    if ((infd = G_open_cell_old(name, mapset)) < 0)
    G_fatal_error(_("Unable to open raster map <%s>"), name);

Does this means that r.example only reads integer maps? I'm asking this
because in GRASS manual, G_open_cell_old is described as:

Open an existing integer raster map (cell).

G_open_cell_old() will open both integer and FP maps. "cell" is being
used as a synonym for "raster"; the terminology pre-dates the support
for FP maps.

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

2009/11/27 Glynn Clements <glynn@gclements.plus.com>:

António Rocha wrote:

In r.example this is performed
/* G_open_cell_old - returns file destriptor (>0) */
if ((infd = G_open_cell_old(name, mapset)) < 0)
G_fatal_error(_("Unable to open raster map <%s>"), name);

Does this means that r.example only reads integer maps? I'm asking this
because in GRASS manual, G_open_cell_old is described as:

Open an existing integer raster map (cell).

G_open_cell_old() will open both integer and FP maps. "cell" is being
used as a synonym for "raster"; the terminology pre-dates the support
for FP maps.

... hence it has been renamed in GRASS 7 to a more
reasonable name scheme:

grass70/doc/raster/r.example/main.c
...
    /* Rast_open_old - returns file destriptor (>0) */
    if ((infd = Rast_open_old(name, mapset)) < 0)
        G_fatal_error(_("Unable to open raster map <%s>"), name);

Markus