00001 /* 00002 ********************************************************************** 00003 * 00004 * G_put_window (window) 00005 * write the current mapset window 00006 ********************************************************************** 00007 * 00008 * G__put_window (window, dir, name) 00009 * write the window 'name' in 'mapset' 00010 * returns -1 error 00011 * 1 ok 00012 *********************************************************************/ 00013 00014 #include "gis.h" 00015 00031 int G_put_window (struct Cell_head *window ) 00032 { 00033 return G__put_window (window,"", "WIND"); 00034 } 00035 00036 int G__put_window ( struct Cell_head *window , char *dir, char *name) 00037 { 00038 FILE *fd ; 00039 00040 if (!(fd = G_fopen_new(dir, name))) 00041 return -1 ; 00042 00043 G__write_Cell_head3 (fd, window, 0); 00044 fclose (fd); 00045 00046 return 1; 00047 }