summaryrefslogtreecommitdiff
path: root/fd.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 13:58:20 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 13:58:20 +0200
commit249866e3d1e11dc72eaa1305f4bb479ded92ef38 (patch)
tree7118c5f58e29fe61c100e4d067bb90ba8d52589e /fd.c
parent96cf8dffe4f7b0b910f790066ae622dc429eb522 (diff)
reorganized file structure
Moved c files into src/. Corrected VERSION file. Removed BUILD and FILES.
Diffstat (limited to 'fd.c')
-rw-r--r--fd.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/fd.c b/fd.c
deleted file mode 100644
index 776575c..0000000
--- a/fd.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <fcntl.h>
-#include "fd.h"
-
-/**
- @file fd.c
- @autor djb
- @source qmail
- @brief file descriptor manipulation
-*/
-
-int close(int __fd); /* we won't use unistd.h here */
-
-int fd_copy(int to,int from)
-{
- if (to == from) return 0;
- if (fcntl(from,F_GETFL,0) == -1) return -1;
- close(to);
- if (fcntl(from,F_DUPFD,to) == -1) return -1;
- return 0;
-}
-
-int fd_move(int to,int from)
-{
- if (to == from) return 0;
- if (fd_copy(to,from) == -1) return -1;
- close(from);
- return 0;
-}
-
-int fd_coe(int fd) {return fcntl(fd,F_SETFD,1); }