cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
cristy | 16af1cb | 2009-12-11 21:38:29 +0000 | [diff] [blame] | 2 | Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 3 | dedicated to making software imaging solutions freely available. |
| 4 | |
| 5 | You may not use this file except in compliance with the License. |
| 6 | obtain a copy of the License at |
| 7 | |
| 8 | http://www.imagemagick.org/script/license.php |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | MagickCore utility methods. |
| 17 | */ |
| 18 | #ifndef _MAGICKCORE_MAC_H |
| 19 | #define _MAGICKCORE_MAC_H |
| 20 | |
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | #include <locale.h> |
| 26 | #include <Errors.h> |
| 27 | #include <Files.h> |
| 28 | #include <errno.h> |
| 29 | |
| 30 | #if defined(_MAGICKCORE_POSIX_SUPPORT_VERSION) |
| 31 | # include <dirent.h> |
| 32 | # if !defined(DISABLE_SIOUX) |
| 33 | # include <SIOUX.h> |
| 34 | # endif |
| 35 | #else |
| 36 | # include <stat.h> |
| 37 | |
| 38 | #define S_IREAD 00400 |
| 39 | #define S_IWRITE 00200 |
| 40 | |
| 41 | typedef struct _DIR |
| 42 | { |
| 43 | int |
| 44 | d_VRefNum; |
| 45 | |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 46 | long |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 47 | d_DirID; |
| 48 | |
| 49 | int |
| 50 | d_index; |
| 51 | } DIR; |
| 52 | |
| 53 | struct dirent |
| 54 | { |
| 55 | char |
| 56 | d_name[255]; |
| 57 | |
| 58 | int |
| 59 | d_namlen; |
| 60 | }; |
| 61 | #endif |
| 62 | |
| 63 | MagickExport Image |
| 64 | *ReadPICTImage(const ImageInfo *,ExceptionInfo *); |
| 65 | |
| 66 | extern MagickExport int |
| 67 | Exit(int), |
| 68 | MACSystemCommand(const char *); |
| 69 | |
| 70 | extern MagickExport MagickBooleanType |
| 71 | MACIsMagickConflict(const char *); |
| 72 | |
| 73 | extern MagickExport void |
| 74 | MACErrorHandler(const ExceptionType,const char *,const char *), |
| 75 | MACWarningHandler(const ExceptionType,const char *,const char *), |
| 76 | ProcessPendingEvents(const char *), |
| 77 | SetApplicationType(const char *,const char *,OSType); |
| 78 | |
| 79 | #if defined(DISABLE_SIOUX) |
| 80 | typedef void |
| 81 | (*MACEventHookPtr)(const char *); |
| 82 | |
| 83 | typedef void |
| 84 | (*MACErrorHookPtr)(const short,const char *text); |
| 85 | |
| 86 | extern MagickExport void |
| 87 | MACSetErrorHook(MACErrorHookPtr), |
| 88 | MACSetEventHook(MACEventHookPtr), |
| 89 | MACFatalErrorHandler(const ExceptionType,const char *,const char *); |
| 90 | #endif |
| 91 | |
| 92 | #if !defined(_MAGICKCORE_POSIX_SUPPORT_VERSION) |
| 93 | extern MagickExport DIR |
| 94 | *opendir(const char *); |
| 95 | |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 96 | extern MagickExport long |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 97 | telldir(DIR *); |
| 98 | |
| 99 | extern MagickExport struct dirent |
| 100 | *readdir(DIR *); |
| 101 | |
| 102 | extern MagickExport void |
cristy | 5ed838e | 2010-05-31 00:05:35 +0000 | [diff] [blame] | 103 | seekdir(DIR *,long |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 104 | closedir(DIR *); |
| 105 | #endif |
| 106 | |
| 107 | #if defined(__cplusplus) || defined(c_plusplus) |
| 108 | } |
| 109 | #endif |
| 110 | |
| 111 | #endif |