00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <stdlib.h>
00033 #include <string.h>
00034 #include <grass/gis.h>
00035 #include <grass/glocale.h>
00036
00037 static int lister(char *, char *, char *);
00038
00039
00051 char *G_ask_cell_new(const char *prompt, char *name)
00052 {
00053
00054 return G_ask_new_ext(prompt, name, "cell", "raster", _("with titles"),
00055 lister);
00056 }
00057
00058
00070 char *G_ask_cell_old(const char *prompt, char *name)
00071 {
00072 return G_ask_old_ext(prompt, name, "cell", "raster", _("with titles"),
00073 lister);
00074 }
00075
00076
00088 char *G_ask_cell_in_mapset(const char *prompt, char *name)
00089 {
00090 return G_ask_in_mapset_ext(prompt, name, "cell", "raster",
00091 _("with titles"), lister);
00092 }
00093
00094 char *G_ask_cell_any(const char *prompt, char *name)
00095 {
00096 return G_ask_any_ext(prompt, name, "cell", "raster", 1, _("with titles"),
00097 lister);
00098 }
00099
00100 static int lister(char *name, char *mapset, char *buf)
00101 {
00102 char *title;
00103
00104 *buf = 0;
00105 if (*name == 0)
00106 return 0;
00107
00108 strcpy(buf, title = G_get_cell_title(name, mapset));
00109 if (*buf == 0)
00110 strcpy(buf, _("(no title)"));
00111 G_free(title);
00112
00113 return 0;
00114 }