d.rast.zoom

Michael Shapiro shapiro at zorro.cecer.army.mil
Sat Feb 8 22:00:48 EST 1992


There was a minor mistake in the posting about the fix to d.rast.zoom:
The declaration of G_align_window() is the mistake. It should be
G__get_window();

WARNING: The use of G__get_window() by user code violates the rules!!
G__ routines are intended to be private to the library and not for
general usage.
---------------------------------------------------------------------
Michael Shapiro U.S. Army CERL                  email:
shapiro at zorro.cecer.army.mil Environmental Division          phone:
(217) 352-6511  ext 526 P.O. Box 9005                   fax:     (217)
373-7222 Champaign, Ill. 61826-9005
---------------------------------------------------------------------


#include "gis.h"

struct Cell_head cur_from_db()
{
    char name[30], window_dir[30];
    struct Cell_head window;
    char *mapset;
    /*char *G_align_window();  <-- this is a mistake */
    char *G__get_window();   /*<-- this is what it should be */

    strcpy(name,"lastwindow");
    strcpy(window_dir,"windows");
    mapset = G_mapset();

    if (G__get_window (&window, window_dir, name, mapset) != NULL){
       G_get_default_window(&window);
        }
    else 
        G_system("g.remove region=lastwindow");

    return (window);
}





More information about the grass-dev mailing list