2
/*************************************************************
3
* I_ask_group_old (prompt,group)
5
* prompt the user for an imagery group file name
6
*************************************************************/
9
#include <grass/imagery.h>
10
static int ask_group(char *, char *);
14
* \brief prompt for an existing group
16
* Asks the user to enter the name of an existing <b>group</b>
17
* in the current mapset.
24
int I_ask_group_old(char *prompt, char *group)
28
prompt = "Select an imagery group file";
29
if (!ask_group(prompt, group))
31
if (I_find_group(group))
33
fprintf(stderr, "\n** %s - not found **\n\n", group);
37
static int ask_group(char *prompt, char *group)
42
fprintf(stderr, "\n%s\n", prompt);
44
"Enter 'list' for a list of existing imagery groups\n");
45
fprintf(stderr, "Enter 'list -f' for a verbose listing\n");
46
fprintf(stderr, "Hit RETURN %s\n", G_get_ask_return_msg());
47
fprintf(stderr, "> ");
52
fprintf(stderr, "<%s>\n", buf);
56
if (strcmp(buf, "list") == 0)
58
else if (strcmp(buf, "list -f") == 0)
60
else if (G_legal_filename(buf) < 0)
61
fprintf(stderr, "\n** <%s> - illegal name **\n\n", buf);