19 #include <grass/gis.h> 
   20 #include <grass/glocale.h> 
   45     char buff[1024], answer[100], ellipse[100];
 
   53             fprintf(stderr, _(
"\nPlease specify datum name\n"));
 
   55                     _(
"Enter 'list' for the list of available datums\n"));
 
   57                     _(
"or 'custom' if you wish to enter custom parameters\n"));
 
   58             fprintf(stderr, _(
"Hit RETURN to cancel request\n"));
 
   63         if (strlen(answer) == 0)
 
   66         if (strcmp(answer, 
"list") == 0) {
 
   68             if (
NULL == (Tmp_fd = fopen(Tmp_file, 
"w")))
 
   73                 fprintf(Tmp_fd, 
"Short Name\tLong Name / Description\n---\n");
 
   75                     fprintf(Tmp_fd, 
"%s\t%s\n\t\t\t(%s ellipsoid)\n---\n",
 
   81                 pager = 
getenv(
"GRASS_PAGER");
 
   82                 if (!pager || strlen(pager) == 0)
 
   84                 sprintf(buff, 
"%s \"%s\" 1>&2", pager,
 
   97                 fprintf(stderr, _(
"\ninvalid datum\n"));
 
int G_strcasecmp(const char *x, const char *y)
String compare ignoring case (upper or lower) 
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
void G_free(void *buf)
Free allocated memory. 
char * G_convert_dirseps_to_host(char *path)
Converts directory separator characters in a string to the native host separator character (/ on Unix...
char * G_tempfile(void)
Returns a temporary file name. 
char * G_datum_name(int n)
int G_ask_datum_name(char *datumname, char *ellpsname)
ask for a valid datum name 
int G_strip(char *buf)
Removes all leading and trailing white space from string. 
char * G_datum_ellipsoid(int n)
int G_ask_ellipse_name(char *spheroid)
char * G_datum_description(int n)
G_warning("category support for [%s] in mapset [%s] %s", name, mapset, type)
int G_system(const char *command)
Run a shell level command. 
int G_get_datum_by_name(const char *name)