nme_in_mps.c File Reference

#include <string.h>
#include <grass/gis.h>

Include dependency graph for nme_in_mps.c:

Go to the source code of this file.

Functions

int G__name_in_mapset (char *name_in, char *name_out, char *mapset)
int G__name_is_fully_qualified (char *fullname, char *name, char *mapset)
char * G_fully_qualified_name (char *name, char *mapset)
 fully qualified file name


Function Documentation

int G__name_in_mapset ( char *  name_in,
char *  name_out,
char *  mapset 
)

Definition at line 18 of file nme_in_mps.c.

int G__name_is_fully_qualified ( char *  fullname,
char *  name,
char *  mapset 
)

char* G_fully_qualified_name ( char *  name,
char *  mapset 
)

fully qualified file name

Returns a fully qualified name for the file name in mapset. Currently this string is in the form name, but the programmer should pretend not to know this and always call this routine to get the fully qualified name. The following example shows how an interactive version of d.rast interfaces with the command-line version of d.rast:

  #include "gis.h"
  int main(char *argc, char **argv)
  {
  char name[GNAME_MAX], *mapset, *fqn;
  char command[1024];
  G_gisinit(argv[0]);
  mapset = G_ask_cell_old ("", name, "");
  if (mapset = = NULL) exit(0);
  fqn = G_fully_qualified_name (name, mapset);
  sprintf (command, "d.rast map='%s'", fqn);
  system(command);
  }

Parameters:
name 
mapset 
Returns:
char *

Definition at line 94 of file nme_in_mps.c.

References G_store().


Generated on Sun Apr 6 17:32:22 2008 for GRASS by  doxygen 1.5.5