/curl/src/ |
H A D | tool_getpass.c | 147 tcgetattr(fd, &withecho); in ttyecho() 150 tcsetattr(fd, TCSANOW, &noecho); in ttyecho() 152 ioctl(fd, TCGETA, &withecho); in ttyecho() 155 ioctl(fd, TCSETA, &noecho); in ttyecho() 158 (void)fd; in ttyecho() 166 tcsetattr(fd, TCSAFLUSH, &withecho); in ttyecho() 168 ioctl(fd, TCSETA, &withecho); in ttyecho() 182 if(-1 == fd) in getpass_r() 188 nread = read(fd, password, buflen); in getpass_r() 200 if(STDIN_FILENO != fd) in getpass_r() [all …]
|
H A D | tool_xattr.c | 83 static int xattr(int fd, in xattr() argument 96 err = fsetxattr(fd, attr, value, strlen(value), 0, 0); in xattr() 98 err = fsetxattr(fd, attr, value, strlen(value), 0); in xattr() 101 ssize_t rc = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, in xattr() 114 int fwrite_xattr(CURL *curl, const char *url, int fd) in fwrite_xattr() argument 124 err = xattr(fd, mappings[i].attr, value); in fwrite_xattr() 131 err = xattr(fd, "user.xdg.origin.url", nurl); in fwrite_xattr()
|
H A D | tool_setup.h | 79 int tool_ftruncate64(int fd, curl_off_t where); 82 #define ftruncate(fd,where) tool_ftruncate64(fd,where) argument
|
H A D | tool_util.c | 170 # define _get_osfhandle(fd) (fd) argument 177 int tool_ftruncate64(int fd, curl_off_t where) in tool_ftruncate64() argument 179 intptr_t handle = _get_osfhandle(fd); in tool_ftruncate64() 181 if(_lseeki64(fd, where, SEEK_SET) < 0) in tool_ftruncate64()
|
H A D | tool_cb_wrt.c | 75 int fd; in tool_create_output_file() local 77 fd = open(fname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE); in tool_create_output_file() 79 } while(fd == -1 && errno == EINTR); in tool_create_output_file() 80 if(config->file_clobber_mode == CLOBBER_NEVER && fd == -1) { in tool_create_output_file() 97 while(fd == -1 && /* haven't successfully opened a file */ in tool_create_output_file() 104 fd = open(newname, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, OPENMODE); in tool_create_output_file() 106 } while(fd == -1 && errno == EINTR); in tool_create_output_file() 116 if(fd != -1) { in tool_create_output_file() 117 file = fdopen(fd, "wb"); in tool_create_output_file() 119 close(fd); in tool_create_output_file()
|
H A D | tool_findfile.c | 79 int fd = open(c, O_RDONLY); in checkhome() local 80 if(fd >= 0) { in checkhome() 82 close(fd); in checkhome()
|
/curl/tests/libtest/ |
H A D | lib537.c | 53 static int *fd = NULL; variable 73 free(fd); in close_file_descriptors() 74 fd = NULL; in close_file_descriptors() 283 fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max)); 284 if(!fd) { 289 if(!fd) { 311 if(fd[0] < 0) { 315 free(fd); 316 fd = NULL; 327 fd[num_open.rlim_cur] = dup(fd[0]); [all …]
|
H A D | lib518.c | 53 static int *fd = NULL; variable 73 free(fd); in close_file_descriptors() 74 fd = NULL; in close_file_descriptors() 294 fd = malloc(sizeof(*fd) * (size_t)(num_open.rlim_max)); in rlimit() 295 if(!fd) { in rlimit() 317 if(fd[0] < 0) { in rlimit() 321 free(fd); in rlimit() 322 fd = NULL; in rlimit() 333 fd[num_open.rlim_cur] = dup(fd[0]); in rlimit() 361 free(fd); in rlimit() [all …]
|
H A D | lib582.c | 49 static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention) in removeFd() argument 54 fprintf(stderr, "Remove socket fd %d\n", (int) fd); in removeFd() 57 if(sockets->sockets[i] == fd) { in removeFd() 69 static void addFd(struct Sockets *sockets, curl_socket_t fd, const char *what) in addFd() argument 75 fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what); in addFd() 76 removeFd(sockets, fd, 0); in addFd() 94 sockets->sockets[sockets->count] = fd; in addFd()
|
H A D | lib530.c | 56 static void removeFd(struct Sockets *sockets, curl_socket_t fd, int mention) in removeFd() argument 61 fprintf(stderr, "Remove socket fd %d\n", (int) fd); in removeFd() 64 if(sockets->sockets[i] == fd) { in removeFd() 77 static int addFd(struct Sockets *sockets, curl_socket_t fd, const char *what) in addFd() argument 83 fprintf(stderr, "Add socket fd %d for %s\n", (int) fd, what); in addFd() 84 removeFd(sockets, fd, 0); in addFd() 106 sockets->sockets[sockets->count] = fd; in addFd()
|
/curl/docs/examples/ |
H A D | fileupload.c | 39 FILE *fd; in main() local 41 fd = fopen("debugit", "rb"); /* open file to upload */ in main() 42 if(!fd) in main() 46 if(fstat(fileno(fd), &file_info) != 0) in main() 59 curl_easy_setopt(curl, CURLOPT_READDATA, fd); in main() 87 fclose(fd); in main()
|
/curl/lib/ |
H A D | warnless.h | 74 ssize_t curlx_read(int fd, void *buf, size_t count); 76 ssize_t curlx_write(int fd, const void *buf, size_t count); 87 #define read(fd, buf, count) curlx_read(fd, buf, count) argument 89 #define write(fd, buf, count) curlx_write(fd, buf, count) argument
|
H A D | file.c | 157 int fd; in file_connect() local 229 fd = -1; in file_connect() 252 file->fd = fd; in file_connect() 273 if(file->fd != -1) in file_done() 275 file->fd = -1; in file_done() 300 int fd; in file_upload() local 333 if(fd < 0) { in file_upload() 345 close(fd); in file_upload() 406 close(fd); in file_upload() 434 int fd; in file_do() local [all …]
|
H A D | fopen.c | 101 int fd = -1; in Curl_fopen() local 134 fd = open(tempstore, O_WRONLY | O_CREAT | O_EXCL, (mode_t)(0600|sb.st_mode)); in Curl_fopen() 136 fd = open(tempstore, O_WRONLY | O_CREAT | O_EXCL, 0600|sb.st_mode); in Curl_fopen() 138 if(fd == -1) in Curl_fopen() 141 *fh = fdopen(fd, FOPEN_WRITETEXT); in Curl_fopen() 149 if(fd != -1) { in Curl_fopen() 150 close(fd); in Curl_fopen()
|
H A D | select.c | 215 pfd[num].fd = readfd0; in Curl_socket_check() 221 pfd[num].fd = readfd1; in Curl_socket_check() 227 pfd[num].fd = writefd; in Curl_socket_check() 330 if(ufds[i].fd == CURL_SOCKET_BAD) in Curl_poll() 347 if(ufds[i].fd == CURL_SOCKET_BAD) in Curl_poll() 349 VERIFY_SOCK(ufds[i].fd); in Curl_poll() 352 if(ufds[i].fd > maxfd) in Curl_poll() 353 maxfd = ufds[i].fd; in Curl_poll() 359 FD_SET(ufds[i].fd, &fds_err); in Curl_poll() 466 cpfds->pfds[cpfds->n].fd = sock; in cpfds_add_sock() [all …]
|
H A D | rand.c | 155 int fd = open(RANDOM_FILE, O_RDONLY); in randit() local 156 if(fd > -1) { in randit() 158 ssize_t nread = read(fd, &randseed, sizeof(randseed)); in randit() 161 close(fd); in randit()
|
H A D | file.h | 35 int fd; /* open file descriptor to read from! */ member
|
/curl/tests/http/testenv/ |
H A D | httpd.py | 146 with open(self._error_log, 'a') as fd: 147 fd.write('start of server\n') 149 fd.write('start of server\n') 221 fd.write(JSONEncoder().encode(data)) 226 fd.write(JSONEncoder().encode(data)) 228 with open(self._basic_passwords, 'w') as fd: 231 with open(self._digest_passwords, 'w') as fd: 235 fd.write('{"area":"digest"}\n') 236 with open(self._conf_file, 'w') as fd: 363 fd.write("\n".join(conf)) [all …]
|
H A D | certs.py | 249 with open(cert_file, "wb") as fd: 250 fd.write(creds.cert_pem) 253 fd.write(c.cert_pem) 255 fd.write(creds.pkey_pem) 258 fd.write(creds.pkey_pem) 260 fd.write(creds.cert_pem) 263 fd.write(c.cert_pem) 264 fd.write(creds.pkey_pem) 279 fd.write(c.cert_pem) 301 with open(fpath) as fd: [all …]
|
/curl/tests/server/ |
H A D | sockfilt.c | 165 if(fd == fileno(stdin)) { in read_wincon() 169 return read(fd, buf, count); in read_wincon() 197 if(fd == fileno(stdout)) { in write_wincon() 636 int error, ret, fd; in select_ws() local 687 for(fd = 0; fd < nfds; fd++) { in select_ws() 713 data[nfd].fd = fd; in select_ws() 813 fd = data[i].fd; in select_ws() 826 else if(fd == fileno(stdout) || fd == fileno(stderr)) { in select_ws() 867 for(fd = 0; fd < nfds; fd++) { in select_ws() 868 if(FD_ISSET(fd, readfds)) in select_ws() [all …]
|
H A D | mqttd.c | 440 rc = swrite(fd, (char *)packet, sendamount); in publish() 456 static int fixedheader(curl_socket_t fd, in fixedheader() argument 465 ssize_t rc = sread(fd, (char *)buffer, 2); in fixedheader() 479 rc = sread(fd, (char *)&buffer[i], 1); in fixedheader() 491 static curl_socket_t mqttit(curl_socket_t fd) in mqttit() argument 614 if(connack(dump, fd)) { in mqttit() 652 if(suback(dump, fd, packet_id)) { in mqttit() 662 if(suback(dump, fd, packet_id)) { in mqttit() 672 disconnect(dump, fd); in mqttit() 687 puback(dump, fd, 0); in mqttit() [all …]
|
H A D | socksd.c | 348 rc = (send)(fd, (char *)response, 8, 0); in socks4() 391 return socks4(fd, buffer, rc); in sockit() 419 rc = (send)(fd, (char *)response, 2, 0); in sockit() 727 curl_socket_t fd = c[i].clientfd; in incoming() local 728 FD_SET(fd, &fds_read); in incoming() 729 if((int)fd > maxfd) in incoming() 730 maxfd = (int)fd; in incoming() 731 fd = c[i].remotefd; in incoming() 732 FD_SET(fd, &fds_read); in incoming() 733 if((int)fd > maxfd) in incoming() [all …]
|
/curl/include/curl/ |
H A D | mprintf.h | 52 CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...) 61 CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args)
|
/curl/tests/certs/scripts/ |
H A D | genroot.sh | 69 "$OPENSSL" genrsa -out "$PREFIX-ca.key" -passout fd:0 "$KEYSIZE" <<EOF 72 "$OPENSSL" req -config "$PREFIX-ca.prm" -new -key "$PREFIX-ca.key" -out "$PREFIX-ca.csr" -passin fd…
|
/curl/tests/certs/ |
H A D | Server-localhost.nn-sv.crt | 30 71:af:a5:fd:51:46:75:cd:78:e0:0c:52:99:41:4f: 65 85:8d:36:e6:db:82:8b:fd:51:a3:3d:42:4c:0d:fd:cf:0b:d8: 69 e5:12:80:5d:02:4c:61:48:95:a8:77:96:49:e2:17:87:fd:3b: 71 99:81:61:77:c4:a4:a2:25:f1:70:34:17:40:f7:cb:f3:fd:da: 73 db:74:3f:bf:8a:8d:06:54:48:fd:9e:88:e8:5d:d2:be:ee:b4:
|