18 #include <grass/gis.h> 
   19 #include <grass/glocale.h> 
   23     char path[GPATH_MAX], 
buff[GPATH_MAX], answer[50], *a;
 
   24     struct Key_Value *in_proj_keys;
 
   30     while (access(path, 0) != 0)
 
   35     npr = in_proj_keys->nitems;
 
   37     if (
NULL == (Tmp_fd = fopen(Tmp_file, 
"w"))) {
 
   40     for (i = 0; i < npr; i++) {
 
   41         fprintf(Tmp_fd, 
"%s -- %s\n", in_proj_keys->key[i],
 
   42                 in_proj_keys->value[i]);
 
   49             fprintf(stderr, _(
"\n\nPlease specify projection name\n"));
 
   51                     _(
"Enter 'list' for the list of available projections\n"));
 
   52             fprintf(stderr, _(
"Hit RETURN to cancel request\n"));
 
   57         if (strlen(answer) == 0)
 
   59         if (strcmp(answer, 
"list") == 0) {
 
   62             pager = 
getenv(
"GRASS_PAGER");
 
   63             if (!pager || strlen(pager) == 0)
 
   67             sprintf(buff, 
"%s \"%s\" 1>&2", pager,
 
   74                 fprintf(stderr, _(
"\ninvalid projection\n"));
 
char * G_find_key_value(const char *key, const struct Key_Value *kv)
Find given key. 
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
char * G_convert_dirseps_to_host(char *path)
Converts directory separator characters in a string to the native host separator character (/ on Unix...
int G_ask_proj_name(char *proj_id, char *proj_name)
char * G_tempfile(void)
Returns a temporary file name. 
struct Key_Value * G_read_key_value_file(const char *file, int *stat)
Read key/values pairs from file. 
int G_strip(char *buf)
Removes all leading and trailing white space from string. 
char * G_gisbase(void)
top level module directory 
int G_system(const char *command)
Run a shell level command. 
int G_fatal_error(const char *msg,...)
Print a fatal error message to stderr.