I'm sorry, but I still don't understand :( Can someone explain this to me ?<br>
<br>
Thanks.<br><br><div><span class="gmail_quote">2006/3/24, Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Ana Soares wrote:<br><br>&gt;&nbsp;&nbsp;int G_gisinit (char *program_name)initialize gis libraryThis routine reads<br>&gt; the user's GRASS environment file into memory and makes sure that the user<br>&gt; has selected a valid database and mapset. It also initializes hidden
<br>&gt; variables used by other routines. If the user's database information is<br>&gt; invalid, an error message is printed and the module exits. The *program_name<br>&gt; * is stored for later recall by *G_program_name.* It is recommended that
<br>&gt; argv[0] be used for the *program_name<br>&gt; *<br>&gt;<br>&gt; *Ok.<br>&gt; *<br>&gt;<br>&gt; *So I use it&nbsp;&nbsp;in my program, like :<br>&gt; *<br>&gt;<br>&gt; * int main(int argc, char **argv) {<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;G_gisinit(argv[0]) ;
<br>&gt; }<br>&gt;<br>&gt; *<br>&gt;<br>&gt; And the program just stands there :-S<br>&gt;<br>&gt; I'm really confused! After all, what does this function do ?<br><br>It checks that the GRASS environment is set up correctly, and
<br>initialises some important variables.<br><br>&gt; How am I supposed to use it?<br><br>Like the above. Then you need to use G_define_{module,flag,option}<br>followed by G_parser(). What happens after that depends upon your
<br>program, but all GRASS modules start with a common framework involving<br>G_gisinit() and G_parser().<br><br>Look at doc/raster/r.example or doc/vector/v.example for examples of<br>how to write GRASS modules.<br><br>--
<br>Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br></blockquote></div><br>