MagickCore 7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
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)
28extern "C" {
29#endif
30
31#if defined(MAGICKCORE_WINDOWS_SUPPORT)
32
33#if !defined(XS_VERSION)
34struct dirent
35{
36 char
37 d_name[2048];
38
39 int
40 d_namlen;
41};
42
43typedef 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__)
59struct timeval;
60
61struct timezone
62{
63 int
64 tz_minuteswest,
65 tz_dsttime;
66};
67#endif
68
69#endif
70
71static 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
85extern MagickPrivate char
86 *NTGetEnvironmentValue(const char *);
87
88#if !defined(MAGICKCORE_LTDL_DELEGATE)
89extern MagickPrivate const char
90 *NTGetLibraryError(void);
91#endif
92
93#if !defined(XS_VERSION)
94extern MagickPrivate const char
95 *NTGetLibraryError(void);
96
97extern MagickPrivate DIR
98 *NTOpenDirectory(const char *);
99
100extern MagickPrivate double
101 NTElapsedTime(void),
102 NTErf(double);
103
104extern MagickPrivate int
105#if !defined(__MINGW32__)
106 gettimeofday(struct timeval *,struct timezone *),
107#endif
108 NTCloseDirectory(DIR *),
109 NTCloseLibrary(void *),
110 NTTruncateFile(int,off_t),
111 NTUnmapMemory(void *,size_t),
112 NTSystemCommand(const char *,char *);
113
114extern MagickPrivate ssize_t
115 NTSystemConfiguration(int);
116
117extern MagickPrivate MagickBooleanType
118 NTGatherRandomData(const size_t,unsigned char *),
119 NTGetExecutionPath(char *,const size_t),
120 NTGetModulePath(const char *,char *),
121 NTGhostscriptFonts(char *,int),
122 NTReportEvent(const char *,const MagickBooleanType);
123
124extern MagickExport MagickBooleanType
125 NTLongPathsEnabled(void);
126
127extern MagickPrivate struct dirent
128 *NTReadDirectory(DIR *);
129
130extern MagickPrivate unsigned char
131 *NTRegistryKeyLookup(const char *),
132 *NTResourceToBlob(const char *);
133
134extern MagickPrivate void
135 *NTGetLibrarySymbol(void *,const char *),
136 NTGhostscriptEXE(char *,int),
137 *NTMapMemory(char *,size_t,int,int,int,MagickOffsetType),
138 *NTOpenLibrary(const char *),
139 NTWindowsGenesis(void),
140 NTWindowsTerminus(void);
141
142#endif /* !XS_VERSION */
143
144#endif /* MAGICKCORE_WINDOWS_SUPPORT */
145
146#if defined(__cplusplus) || defined(c_plusplus)
147}
148#endif /* !C++ */
149
150#endif /* !MAGICKCORE_NT_BASE_H */
Definition vms.h:942