MagickCore  7.1.0
Convert, Edit, Or Compose Bitmap Images
nt-base-private.h
1 /*
2  Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3  dedicated to making software imaging solutions freely available.
4 
5  You may not use this file except in compliance with the License. You may
6  obtain a copy of the License at
7 
8  https://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 Windows NT private methods.
17 */
18 #ifndef MAGICKCORE_NT_BASE_PRIVATE_H
19 #define MAGICKCORE_NT_BASE_PRIVATE_H
20 
21 #include "MagickCore/delegate.h"
22 #include "MagickCore/delegate-private.h"
23 #include "MagickCore/exception.h"
24 #include "MagickCore/memory_.h"
25 #include "MagickCore/splay-tree.h"
26 
27 #if defined(__cplusplus) || defined(c_plusplus)
28 extern "C" {
29 #endif
30 
31 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
32 
33 #if !defined(XS_VERSION)
34 struct dirent
35 {
36  char
37  d_name[2048];
38 
39  int
40  d_namlen;
41 };
42 
43 typedef struct _DIR
44 {
45  HANDLE
46  hSearch;
47 
48  WIN32_FIND_DATAW
49  Win32FindData;
50 
51  BOOL
52  firsttime;
53 
54  struct dirent
55  file_info;
56 } DIR;
57 
58 #if !defined(__MINGW32__)
59 struct timeval;
60 
61 struct timezone
62 {
63  int
64  tz_minuteswest,
65  tz_dsttime;
66 };
67 #endif
68 
69 #endif
70 
71 static inline void *NTAcquireQuantumMemory(const size_t count,
72  const size_t quantum)
73 {
74  size_t
75  size;
76 
77  if (HeapOverflowSanityCheckGetSize(count,quantum,&size) != MagickFalse)
78  {
79  errno=ENOMEM;
80  return(NULL);
81  }
82  return(AcquireMagickMemory(size));
83 }
84 
85 extern MagickPrivate char
86  *NTGetLastError(void);
87 
88 #if !defined(MAGICKCORE_LTDL_DELEGATE)
89 extern MagickPrivate const char
90  *NTGetLibraryError(void);
91 #endif
92 
93 #if !defined(XS_VERSION)
94 extern MagickPrivate const char
95  *NTGetLibraryError(void);
96 
97 extern MagickPrivate DIR
98  *NTOpenDirectory(const char *);
99 
100 extern MagickPrivate double
101  NTElapsedTime(void),
102  NTErf(double),
103  NTUserTime(void);
104 
105 extern MagickPrivate int
106 #if !defined(__MINGW32__)
107  gettimeofday(struct timeval *,struct timezone *),
108 #endif
109  NTCloseDirectory(DIR *),
110  NTCloseLibrary(void *),
111  NTControlHandler(void),
112  NTExitLibrary(void),
113  NTTruncateFile(int,off_t),
114  NTInitializeLibrary(void),
115  NTSetSearchPath(const char *),
116  NTUnmapMemory(void *,size_t),
117  NTSystemCommand(const char *,char *);
118 
119 extern MagickPrivate ssize_t
120  NTSystemConfiguration(int);
121 
122 extern MagickPrivate MagickBooleanType
123  NTGatherRandomData(const size_t,unsigned char *),
124  NTGetExecutionPath(char *,const size_t),
125  NTGetModulePath(const char *,char *),
126  NTGhostscriptFonts(char *,int),
127  NTReportEvent(const char *,const MagickBooleanType);
128 
129 extern MagickExport MagickBooleanType
130  NTLongPathsEnabled();
131 
132 extern MagickPrivate struct dirent
133  *NTReadDirectory(DIR *);
134 
135 extern MagickPrivate unsigned char
136  *NTRegistryKeyLookup(const char *),
137  *NTResourceToBlob(const char *);
138 
139 extern MagickPrivate void
140  *NTGetLibrarySymbol(void *,const char *),
141  NTGhostscriptEXE(char *,int),
142  NTInitializeWinsock(MagickBooleanType),
143  *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType),
144  *NTOpenLibrary(const char *),
145  NTWindowsGenesis(void),
146  NTWindowsTerminus(void);
147 
148 #endif /* !XS_VERSION */
149 
150 #endif /* MAGICKCORE_WINDOWS_SUPPORT */
151 
152 #if defined(__cplusplus) || defined(c_plusplus)
153 }
154 #endif /* !C++ */
155 
156 #endif /* !MAGICKCORE_NT_BASE_H */
Definition: vms.h:951
Definition: vms.h:942