Lines Matching refs:str
127 * getparameter a lot, we must check it for NULL before accessing the str
130 static ParameterError getnum(long *val, const char *str, int base)
132 if(str) {
135 if(!str[0])
138 num = strtol(str, &endptr, base);
141 if((endptr != str) && (*endptr == '\0')) {
149 ParameterError str2num(long *val, const char *str)
151 return getnum(val, str, 10);
154 ParameterError oct2nummax(long *val, const char *str, long max)
156 ParameterError result = getnum(val, str, 8);
172 * getparameter a lot, we must check it for NULL before accessing the str
176 ParameterError str2unum(long *val, const char *str)
178 ParameterError result = getnum(val, str, 10);
193 * getparameter a lot, we must check it for NULL before accessing the str
197 ParameterError str2unummax(long *val, const char *str, long max)
199 ParameterError result = str2unum(val, str);
217 * getparameter a lot, we must check it for NULL before accessing the str
221 static ParameterError str2double(double *val, const char *str, double max)
223 if(str) {
227 num = strtod(str, &endptr);
234 if((endptr != str) && (endptr == str + strlen(str))) {
251 * getparameter a lot, we must check it for NULL before accessing the str
255 ParameterError secs2ms(long *valp, const char *str)
258 ParameterError result = str2double(&value, str, (double)LONG_MAX/1000);
322 * getparameter a lot, we must check it for NULL before accessing the str
329 const char * const *val, char **ostr, const char *str)
341 if(!str)
344 buffer = strdup(str); /* because strtok corrupts it */
445 * @param str the protocol name
450 ParameterError check_protocol(const char *str)
452 if(!str)
455 if(proto_token(str))
465 * @param str the buffer containing the offset
468 ParameterError str2offset(curl_off_t *val, const char *str)
471 if(str[0] == '-')
477 CURLofft offt = curlx_strtoofft(str, &endptr, 10, val);
485 *val = strtol(str, &endptr, 0);
489 if((endptr != str) && (endptr == str + strlen(str)))
560 int ftpfilemethod(struct OperationConfig *config, const char *str)
562 if(curl_strequal("singlecwd", str))
564 if(curl_strequal("nocwd", str))
566 if(curl_strequal("multicwd", str))
570 str);
575 int ftpcccmethod(struct OperationConfig *config, const char *str)
577 if(curl_strequal("passive", str))
579 if(curl_strequal("active", str))
583 str);
588 long delegation(struct OperationConfig *config, const char *str)
590 if(curl_strequal("none", str))
592 if(curl_strequal("policy", str))
594 if(curl_strequal("always", str))
598 str);
681 * getparameter a lot, we must check it for NULL before accessing the str
685 ParameterError str2tls_max(long *val, const char *str)
698 if(!str)
701 if(!strcmp(str, tls_max_array[i].tls_max_str)) {