#include <grass/gis.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
int | G_yes (char *question, int dflt) |
ask a yes/no question |
int G_yes | ( | char * | question, | |
int | dflt | |||
) |
ask a yes/no question
This routine prints a question to the user, and expects the user to respond either yes or no. (Invalid responses are rejected and the process is repeated until the user answers yes or no.) The default indicates what the RETURN key alone should mean. A default of 1 indicates that RETURN means yes, 0 indicates that RETURN means no, and -1 indicates that RETURN alone is not a valid response. The question will be appended with ''(y/n) '', and, if default is not -1, with ''[y] '' or ''[n] '', depending on the default. G_yes (~) returns 1 if the user said yes, and 0 if the user said no.
question | ||
default |