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"));
109 sprintf(ellpsname, ellipse);
110 sprintf(datumname,
"custom");