Lines Matching refs:response
77 // (If def is outside of the low-high range, an explicit response
80 uint64_t response, num;
89 num = sscanf(line, "%" PRIu64, &response);
90 if (num == 1) { // user provided a response
91 if ((response < low) || (response > high))
94 response = def;
96 } while ((response < low) || (response > high));
99 response = low;
101 return (response);
104 // Gets a Y/N response (and converts lowercase to uppercase)
106 char response;
115 response = toupper(line[0]);
116 } while ((response != 'Y') && (response != 'N'));
117 return response;
140 uint64_t response = def, bytesPerUnit, mult = 1, divide = 1;
161 // Extract numeric response and, if present, suffix
165 inString >> response >> suffix;
176 // If no response, or if response == 0, use default (def)
177 if ((inValue.length() == 0) || (response == 0)) {
178 response = def;
190 // Adjust response based on multiplier and plus flag, if present
192 if (response > (UINT64_MAX / mult))
195 response *= mult;
197 response /= divide;
201 // Recompute response based on low part of range (if default is within
207 if (response > 0)
208 response--;
209 if (response > (UINT64_MAX - low))
212 response = response + low;
214 if (response > (UINT64_MAX - def))
217 response = response + def;
220 if (response > high)
223 response = high - response;
227 response = UINT64_C(0);
229 return response;