fd                417 src/dps8/dps8_crdrdr.c static int getCardLine (int fd, unsigned char * buffer)
fd                424 src/dps8/dps8_crdrdr.c         ssize_t rc = read (fd, & ch, 1);
fd                440 src/dps8/dps8_crdrdr.c static int getCardData (int fd, char * buffer)
fd                443 src/dps8/dps8_crdrdr.c     ssize_t rc = read (fd, buffer, 80);
fd                450 src/dps8/dps8_crdrdr.c static int getRawCardData (int fd, uint8_t * buffer)
fd                453 src/dps8/dps8_crdrdr.c     ssize_t rc = read (fd, buffer, rawCardImageBytes);
fd                349 src/dps8/dps8_socket_dev.c     int fd = -1;
fd                372 src/dps8/dps8_socket_dev.c         fd = socket ((int) buffer[0], (int) buffer[1], (int) buffer[2]);
fd                373 src/dps8/dps8_socket_dev.c sim_printf ("socket() returned %d\n", fd);
fd                374 src/dps8/dps8_socket_dev.c         if (fd < 0)
fd                379 src/dps8/dps8_socket_dev.c         else if (fd < N_FDS)
fd                381 src/dps8/dps8_socket_dev.c             sk_data.fd_unit[fd] = (int) unit_idx;
fd                382 src/dps8/dps8_socket_dev.c             sk_data.fd_dev_code[fd] = dev_code;
fd                384 src/dps8/dps8_socket_dev.c             sk_data.fd_nonblock[fd] = 0;
fd                386 src/dps8/dps8_socket_dev.c             sk_data.fd_nonblock[fd] = !! (type & SOCK_NONBLOCK);
fd                391 src/dps8/dps8_socket_dev.c             close (fd);
fd                392 src/dps8/dps8_socket_dev.c             fd = -1;
fd                397 src/dps8/dps8_socket_dev.c     buffer[3] = ((word36) ((word36s) fd)) & MASK36; // fd
fd               1147 src/dps8/dps8_socket_dev.c     int fd = accept (sk_data.unit_data[unit_idx][dev_code].accept_fd, (struct sockaddr *) & from, & size);
fd               1148 src/dps8/dps8_socket_dev.c     if (fd == -1)
fd               1154 src/dps8/dps8_socket_dev.c     else if (fd < N_FDS)
fd               1156 src/dps8/dps8_socket_dev.c         sk_data.fd_unit[fd] = (int) unit_idx;
fd               1157 src/dps8/dps8_socket_dev.c         sk_data.fd_dev_code[fd] = dev_code;
fd               1158 src/dps8/dps8_socket_dev.c         sk_data.fd_nonblock[fd] = false ; // !! (type & SOCK_NONBLOCK);
fd               1162 src/dps8/dps8_socket_dev.c         close (fd);
fd               1163 src/dps8/dps8_socket_dev.c         fd = -1;
fd               1169 src/dps8/dps8_socket_dev.c     buffer[1] = ((word36) ((word36s) fd)) & MASK36;
fd                227 src/dps8/fnpuv.c     int fd, err;
fd                229 src/dps8/fnpuv.c     if ((fd = open ("/dev/net/tun", O_RDWR)) < 0)
fd                231 src/dps8/fnpuv.c       return fd;
fd                246 src/dps8/fnpuv.c     if ((err = ioctl (fd, TUNSETIFF, (void *) & ifr)) < 0)
fd                248 src/dps8/fnpuv.c         close (fd);
fd                252 src/dps8/fnpuv.c     return fd;
fd                658 src/dps8/hdbg.c   int fd = open ("M.dump", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
fd                659 src/dps8/hdbg.c   if (fd == -1) {
fd                664 src/dps8/hdbg.c   /* ssize_t n = */ write (fd, (const void *) M, MEMSIZE * sizeof (word36));
fd                665 src/dps8/hdbg.c   close (fd);
fd               1121 src/dps8/panelScraper.c static void lwrite (FD fd, const void * buf, size_t count)
fd               1125 src/dps8/panelScraper.c     if(!WriteFile(fd, buf, count, &bytes_written, NULL))
fd               1128 src/dps8/panelScraper.c         CloseHandle(fd);
fd               1132 src/dps8/panelScraper.c     write (fd, buf, count);
fd               1136 src/dps8/panelScraper.c static void send_lamp_data (FD fd)
fd               1140 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1142 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1144 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1146 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1148 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1150 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1152 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1154 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1156 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1158 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1160 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1162 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1164 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1166 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1168 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1170 src/dps8/panelScraper.c     lwrite (fd, buf, 10);
fd               1173 src/dps8/panelScraper.c     syncfs (fd);
fd               1200 src/dps8/panelScraper.c static int time_handler (FD fd)
fd               1244 src/dps8/panelScraper.c         send_lamp_data (fd);
fd               1271 src/dps8/panelScraper.c     send_lamp_data (fd);
fd               1283 src/dps8/panelScraper.c     if (poll (& (struct pollfd) { .fd = port_fd, .events = POLLIN }, 1, 0) == 1)
fd               1476 src/dps8/panelScraper.c     int fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY);
fd               1477 src/dps8/panelScraper.c     if(fd == -1)
fd               1482 src/dps8/panelScraper.c     if(tcgetattr(fd, &config) < 0)
fd               1485 src/dps8/panelScraper.c         close (fd);
fd               1542 src/dps8/panelScraper.c         close (fd);
fd               1549 src/dps8/panelScraper.c      if(tcsetattr(fd, TCSAFLUSH, &config) < 0)
fd               1552 src/dps8/panelScraper.c          close (fd);
fd               1560 src/dps8/panelScraper.c         time_handler (fd);
fd               1561 src/dps8/panelScraper.c         update_port (fd);
fd               1568 src/dps8/panelScraper.c     if (fd != -1)
fd               1569 src/dps8/panelScraper.c       close (fd);
fd               1570 src/dps8/panelScraper.c     fd = -1;
fd                343 src/dps8/segldr.c     int fd = open (p2, O_WRONLY | O_CREAT, 0664);
fd                344 src/dps8/segldr.c     if (fd < 0)
fd                354 src/dps8/segldr.c     ssize_t n = write (fd, (void *) M, wrsz);
fd                365 src/dps8/segldr.c     (void) close (fd);
fd                371 src/dps8/segldr.c     int fd = open (p2, O_RDONLY);
fd                372 src/dps8/segldr.c     if (fd < 0)
fd                382 src/dps8/segldr.c     ssize_t n = read (fd, (void *) M, msize);
fd                387 src/dps8/segldr.c         (void) close (fd);
fd                402 src/dps8/segldr.c     (void) close (fd);
fd                 87 src/dps8/shm.c   int fd = open(buf, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
fd                 88 src/dps8/shm.c   if (fd == -1)
fd                228 src/dps8/shm.c       rc = flock(fd, LOCK_EX | LOCK_NB);
fd                248 src/dps8/shm.c       rc = fcntl(fd, F_SETLK, &lock);
fd                255 src/dps8/shm.c       if (fcntl(fd, F_GETLK, &lock) == FALSE && lock.l_pid > 0)
fd                268 src/dps8/shm.c   if (ftruncate(fd, (off_t)shm_size) == -1)
fd                279 src/dps8/shm.c            MAP_SHARED, fd, 0);
fd                315 src/dps8/shm.c   int fd = open(buf, O_RDWR, 0);
fd                316 src/dps8/shm.c   if (fd == -1)
fd                348 src/dps8/shm.c       rc = flock(fd, LOCK_EX | LOCK_NB);
fd                365 src/dps8/shm.c       rc = fcntl(fd, F_SETLK, &lock);
fd                383 src/dps8/shm.c            MAP_SHARED, fd, 0);
fd                390 src/dps8/shm.c           (void)fcntl(fd, F_SETLK, &lock);
fd                394 src/dps8/shm.c         (void)fsync(fd);
fd                395 src/dps8/shm.c       (void)close(fd);
fd                 33 src/dps8/tracker.c static int fd;
fd                 43 src/dps8/tracker.c         write (fd, & segno, sizeof (segno));
fd                 44 src/dps8/tracker.c         write (fd, & ic, sizeof (ic));
fd                 45 src/dps8/tracker.c         write (fd, & opcode, sizeof (opcode));
fd                 51 src/dps8/tracker.c     read (fd, & psegno, sizeof (segno));
fd                 52 src/dps8/tracker.c     read (fd, & pic, sizeof (ic));
fd                 53 src/dps8/tracker.c     read (fd, & popcode, sizeof (opcode));
fd                 76 src/dps8/tracker.c         fd = open ("track.dat", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
fd                 80 src/dps8/tracker.c         fd = open ("track.dat", O_RDONLY, 0);
fd                 82 src/dps8/tracker.c     if (fd == -1)
fd                194 src/dps8/utfile.c     int fd = open(pattern, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR);
fd                196 src/dps8/utfile.c     if (fd >= 0)
fd                199 src/dps8/utfile.c       return ( fd );
fd                176 src/libsir/include/sir/helpers.h void _sir_safeclose(int* restrict fd);
fd                182 src/libsir/include/sir/helpers.h bool _sir_validfd(int fd);
fd                 81 src/libsir/src/sirfilesystem.c         int fd = open(base_path, open_flags);
fd                 82 src/libsir/src/sirfilesystem.c         if (-1 == fd) {
fd                 86 src/libsir/src/sirfilesystem.c         stat_ret = fstatat(fd, path, st, AT_SYMLINK_NOFOLLOW);
fd                 90 src/libsir/src/sirfilesystem.c         int fd = AT_FDCWD;
fd                 93 src/libsir/src/sirfilesystem.c             stat_ret = fstatat(fd, path, st, AT_SYMLINK_NOFOLLOW);
fd                100 src/libsir/src/sirfilesystem.c         _sir_safeclose(&fd);
fd                452 src/libsir/src/sirfilesystem.c     int fd;
fd                461 src/libsir/src/sirfilesystem.c     fd = open(pp, O_RDONLY);
fd                462 src/libsir/src/sirfilesystem.c     if (fd < 0)
fd                465 src/libsir/src/sirfilesystem.c     res = read(fd, &ps, sizeof(ps));
fd                466 src/libsir/src/sirfilesystem.c     close(fd);
fd                 44 src/libsir/src/sirhelpers.c void _sir_safeclose(int* restrict fd) {
fd                 45 src/libsir/src/sirhelpers.c     if (!fd || 0 > *fd)
fd                 48 src/libsir/src/sirhelpers.c     if (-1 == close(*fd))
fd                 51 src/libsir/src/sirhelpers.c     *fd = -1;
fd                 64 src/libsir/src/sirhelpers.c bool _sir_validfd(int fd) {
fd                 66 src/libsir/src/sirhelpers.c     if (2 >= fd)
fd                 70 src/libsir/src/sirhelpers.c     int ret = fcntl(fd, F_GETFL);
fd                 76 src/libsir/src/sirhelpers.c     int ret = _fstat(fd, &st);
fd                225 src/simh/linehistory.c enableRawMode(int fd)
fd                240 src/simh/linehistory.c   if (tcgetattr(fd, &orig_termios) == -1)
fd                267 src/simh/linehistory.c   if (tcsetattr(fd, TCSA_TYPE, &raw) < 0)
fd                281 src/simh/linehistory.c disableRawMode(int fd)
fd                288 src/simh/linehistory.c   if (rawmode && tcsetattr(fd, TCSA_TYPE, &orig_termios) != -1)
fd                702 src/simh/linehistory.c   int    fd   = l->ofd;
fd                750 src/simh/linehistory.c   if (write(fd, ab.b, ab.len) == -1)
fd                775 src/simh/linehistory.c   int fd = l->ofd, j;
fd                873 src/simh/linehistory.c   if (write(fd, ab.b, ab.len) == -1)
fd               10969 src/simh/scp.c     int fd;
fd               10971 src/simh/scp.c     fd = _open (tmpnam, _O_CREAT | _O_RDWR | _O_EXCL, _S_IREAD | _S_IWRITE);
fd               10972 src/simh/scp.c     if (fd != -1) {
fd               10973 src/simh/scp.c         tmp = _fdopen (fd, "w+");