28 #include <grass/vask.h>
80 int V_ques(
void *src,
int var_type,
int row,
int col,
int length)
82 union target targetptr;
86 if (
V__.NUM_ANSW >= MAX_ANSW) {
87 V_error(
"Too many questions in call to V_ques");
90 if ((row < 0) || (row >= MAX_LINE)) {
91 V_error(
"Illegal row (%d) in call to V_ques", row);
94 if ((col < 0) || (col >= 80)) {
95 V_error(
"Illegal column (%d) in call to V_ques", col);
99 V_error(
"Negative length in call to V_ques");
102 if (length + col > 80)
105 if ((var_type ==
's') || (var_type ==
'i') || (var_type ==
'f')
106 || (var_type ==
'l') || (var_type ==
'd')) {
107 V__.usr_answ[
V__.NUM_ANSW].targetptr = targetptr;
108 V__.usr_answ[
V__.NUM_ANSW].var_type = var_type;
109 V__.usr_answ[
V__.NUM_ANSW].row = row;
110 V__.usr_answ[
V__.NUM_ANSW].col = col;
111 V__.usr_answ[
V__.NUM_ANSW].length = length;
112 V__.usr_answ[
V__.NUM_ANSW].decimal_places =
V__.decimal_places;
118 V_error(
"Illegal variable type in call to V_ques");
void V_error(const char *fmt,...)
int V_ques(void *src, int var_type, int row, int col, int length)