diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-06-25 19:55:56 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-06-25 20:00:34 +0200 |
commit | 70260e6b8c8c6d322c1a32e14f984784b7bb0506 (patch) | |
tree | 0168100b279a8e36e5bdd2e99d6f0315a5b1842d /src/util.cc | |
parent | 8b0b19886d9dc7bddc62d063bd360d353377cc53 (diff) |
Remove MACH_O_CARBON code
It's been a long time since Carbon was relevant.
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/util.cc b/src/util.cc index 87cfde03..ee138625 100644 --- a/src/util.cc +++ b/src/util.cc @@ -334,7 +334,6 @@ errr path_build(char *buf, int max, cptr path, cptr file) */ FILE *my_fopen(cptr file, cptr mode) { -#ifndef MACH_O_CARBON char buf[1024]; @@ -344,24 +343,6 @@ FILE *my_fopen(cptr file, cptr mode) /* Attempt to fopen the file anyway */ return (fopen(buf, mode)); -#else /* MACH_O_CARBON */ - -char buf[1024]; -FILE *s; - -/* Hack -- Try to parse the path */ -if (path_parse(buf, 1024, file)) return (NULL); - -/* Attempt to fopen the file anyway */ -s = fopen(buf, mode); - -/* Set creator and type if the file is successfully opened */ -if (s) fsetfileinfo(buf, _fcreator, _ftype); - -/* Done */ -return (s); - -#endif /* MACH_O_CARBON */ } @@ -574,27 +555,10 @@ int fd_make(cptr file, int mode) /* Hack -- Try to parse the path */ if (path_parse(buf, 1024, file)) return ( -1); -#ifdef MACH_O_CARBON - -{ -int fdes; - -/* Create the file, fail if exists, write-only, binary */ -fdes = open(buf, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, mode); - -/* Set creator and type if the file is successfully opened */ -if (fdes >= 0) fsetfileinfo(buf, _fcreator, _ftype); - -/* Return the descriptor */ -return (fdes); -} - -#else /* MACH_O_CARBON */ /* Create the file, fail if exists, write-only, binary */ return (open(buf, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, mode)); -#endif /* MACH_O_CARBON */ } @@ -611,27 +575,10 @@ int fd_open(cptr file, int flags) /* Hack -- Try to parse the path */ if (path_parse(buf, 1024, file)) return ( -1); -#ifdef MACH_O_CARBON - - { - int fdes; - - /* Attempt to open the file */ - fdes = open(buf, flags | O_BINARY, 0); - - /* Set creator and type if the file is successfully opened */ - if (fdes >= 0) fsetfileinfo(buf, _fcreator, _ftype); - - /* Return the descriptor */ - return (fdes); - } - -#else /* MACH_O_CARBON */ /* Attempt to open the file */ return (open(buf, flags | O_BINARY, 0)); -#endif /* MACH_O_CARBON */ } |