diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/extractor.h | 686 | ||||
-rw-r--r-- | src/include/gettext.h | 6 | ||||
-rw-r--r-- | src/include/platform.h | 11 | ||||
-rw-r--r-- | src/include/plibc.h | 1138 |
4 files changed, 977 insertions, 864 deletions
diff --git a/src/include/extractor.h b/src/include/extractor.h index 3e86868..3e6c098 100644 --- a/src/include/extractor.h +++ b/src/include/extractor.h | |||
@@ -54,65 +54,65 @@ extern "C" { | |||
54 | * Options for how plugin execution should be done. | 54 | * Options for how plugin execution should be done. |
55 | */ | 55 | */ |
56 | enum EXTRACTOR_Options | 56 | enum EXTRACTOR_Options |
57 | { | 57 | { |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Run plugin out-of-process, starting the process once the plugin | 60 | * Run plugin out-of-process, starting the process once the plugin |
61 | * is to be run. If a plugin crashes, automatically restart the | 61 | * is to be run. If a plugin crashes, automatically restart the |
62 | * respective process for the same file and try once more | 62 | * respective process for the same file and try once more |
63 | * (since the crash may be caused by the previous file). If | 63 | * (since the crash may be caused by the previous file). If |
64 | * the process crashes immediately again, it is not restarted | 64 | * the process crashes immediately again, it is not restarted |
65 | * until the next file. | 65 | * until the next file. |
66 | */ | 66 | */ |
67 | EXTRACTOR_OPTION_DEFAULT_POLICY = 0, | 67 | EXTRACTOR_OPTION_DEFAULT_POLICY = 0, |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * Deprecated option. Ignored. | 70 | * Deprecated option. Ignored. |
71 | */ | 71 | */ |
72 | EXTRACTOR_OPTION_OUT_OF_PROCESS_NO_RESTART = 1, | 72 | EXTRACTOR_OPTION_OUT_OF_PROCESS_NO_RESTART = 1, |
73 | 73 | ||
74 | /** | 74 | /** |
75 | * Run plugins in-process. Unsafe, not recommended, | 75 | * Run plugins in-process. Unsafe, not recommended, |
76 | * can be nice for debugging. | 76 | * can be nice for debugging. |
77 | */ | 77 | */ |
78 | EXTRACTOR_OPTION_IN_PROCESS = 2, | 78 | EXTRACTOR_OPTION_IN_PROCESS = 2, |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Internal value for plugins that have been disabled. | 81 | * Internal value for plugins that have been disabled. |
82 | */ | 82 | */ |
83 | EXTRACTOR_OPTION_DISABLED = 3 | 83 | EXTRACTOR_OPTION_DISABLED = 3 |
84 | 84 | ||
85 | }; | 85 | }; |
86 | 86 | ||
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Format in which the extracted meta data is presented. | 89 | * Format in which the extracted meta data is presented. |
90 | */ | 90 | */ |
91 | enum EXTRACTOR_MetaFormat | 91 | enum EXTRACTOR_MetaFormat |
92 | { | 92 | { |
93 | /** | 93 | /** |
94 | * Format is unknown. | 94 | * Format is unknown. |
95 | */ | 95 | */ |
96 | EXTRACTOR_METAFORMAT_UNKNOWN = 0, | 96 | EXTRACTOR_METAFORMAT_UNKNOWN = 0, |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * 0-terminated, UTF-8 encoded string. "data_len" | 99 | * 0-terminated, UTF-8 encoded string. "data_len" |
100 | * is strlen(data)+1. | 100 | * is strlen(data)+1. |
101 | */ | 101 | */ |
102 | EXTRACTOR_METAFORMAT_UTF8 = 1, | 102 | EXTRACTOR_METAFORMAT_UTF8 = 1, |
103 | 103 | ||
104 | /** | 104 | /** |
105 | * Some kind of binary format, see given Mime type. | 105 | * Some kind of binary format, see given Mime type. |
106 | */ | 106 | */ |
107 | EXTRACTOR_METAFORMAT_BINARY = 2, | 107 | EXTRACTOR_METAFORMAT_BINARY = 2, |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * 0-terminated string. The specific encoding is unknown. | 110 | * 0-terminated string. The specific encoding is unknown. |
111 | * "data_len" is strlen (data)+1. | 111 | * "data_len" is strlen (data)+1. |
112 | */ | 112 | */ |
113 | EXTRACTOR_METAFORMAT_C_STRING = 3 | 113 | EXTRACTOR_METAFORMAT_C_STRING = 3 |
114 | 114 | ||
115 | }; | 115 | }; |
116 | 116 | ||
117 | 117 | ||
118 | /** | 118 | /** |
@@ -123,283 +123,283 @@ enum EXTRACTOR_MetaFormat | |||
123 | * @{ | 123 | * @{ |
124 | */ | 124 | */ |
125 | enum EXTRACTOR_MetaType | 125 | enum EXTRACTOR_MetaType |
126 | { | 126 | { |
127 | /* fundamental types */ | 127 | /* fundamental types */ |
128 | EXTRACTOR_METATYPE_RESERVED = 0, | 128 | EXTRACTOR_METATYPE_RESERVED = 0, |
129 | EXTRACTOR_METATYPE_MIMETYPE = 1, | 129 | EXTRACTOR_METATYPE_MIMETYPE = 1, |
130 | EXTRACTOR_METATYPE_FILENAME = 2, | 130 | EXTRACTOR_METATYPE_FILENAME = 2, |
131 | EXTRACTOR_METATYPE_COMMENT = 3, | 131 | EXTRACTOR_METATYPE_COMMENT = 3, |
132 | 132 | ||
133 | /* Standard types from bibtex */ | 133 | /* Standard types from bibtex */ |
134 | EXTRACTOR_METATYPE_TITLE = 4, | 134 | EXTRACTOR_METATYPE_TITLE = 4, |
135 | EXTRACTOR_METATYPE_BOOK_TITLE = 5, | 135 | EXTRACTOR_METATYPE_BOOK_TITLE = 5, |
136 | EXTRACTOR_METATYPE_BOOK_EDITION = 6, | 136 | EXTRACTOR_METATYPE_BOOK_EDITION = 6, |
137 | EXTRACTOR_METATYPE_BOOK_CHAPTER_NUMBER = 7, | 137 | EXTRACTOR_METATYPE_BOOK_CHAPTER_NUMBER = 7, |
138 | EXTRACTOR_METATYPE_JOURNAL_NAME = 8, | 138 | EXTRACTOR_METATYPE_JOURNAL_NAME = 8, |
139 | EXTRACTOR_METATYPE_JOURNAL_VOLUME = 9, | 139 | EXTRACTOR_METATYPE_JOURNAL_VOLUME = 9, |
140 | EXTRACTOR_METATYPE_JOURNAL_NUMBER = 10, | 140 | EXTRACTOR_METATYPE_JOURNAL_NUMBER = 10, |
141 | EXTRACTOR_METATYPE_PAGE_COUNT = 11, | 141 | EXTRACTOR_METATYPE_PAGE_COUNT = 11, |
142 | EXTRACTOR_METATYPE_PAGE_RANGE = 12, | 142 | EXTRACTOR_METATYPE_PAGE_RANGE = 12, |
143 | EXTRACTOR_METATYPE_AUTHOR_NAME = 13, | 143 | EXTRACTOR_METATYPE_AUTHOR_NAME = 13, |
144 | EXTRACTOR_METATYPE_AUTHOR_EMAIL = 14, | 144 | EXTRACTOR_METATYPE_AUTHOR_EMAIL = 14, |
145 | EXTRACTOR_METATYPE_AUTHOR_INSTITUTION = 15, | 145 | EXTRACTOR_METATYPE_AUTHOR_INSTITUTION = 15, |
146 | EXTRACTOR_METATYPE_PUBLISHER = 16, | 146 | EXTRACTOR_METATYPE_PUBLISHER = 16, |
147 | EXTRACTOR_METATYPE_PUBLISHER_ADDRESS = 17, | 147 | EXTRACTOR_METATYPE_PUBLISHER_ADDRESS = 17, |
148 | EXTRACTOR_METATYPE_PUBLISHER_INSTITUTION = 18, | 148 | EXTRACTOR_METATYPE_PUBLISHER_INSTITUTION = 18, |
149 | EXTRACTOR_METATYPE_PUBLISHER_SERIES = 19, | 149 | EXTRACTOR_METATYPE_PUBLISHER_SERIES = 19, |
150 | EXTRACTOR_METATYPE_PUBLICATION_TYPE = 20, | 150 | EXTRACTOR_METATYPE_PUBLICATION_TYPE = 20, |
151 | EXTRACTOR_METATYPE_PUBLICATION_YEAR = 21, | 151 | EXTRACTOR_METATYPE_PUBLICATION_YEAR = 21, |
152 | EXTRACTOR_METATYPE_PUBLICATION_MONTH = 22, | 152 | EXTRACTOR_METATYPE_PUBLICATION_MONTH = 22, |
153 | EXTRACTOR_METATYPE_PUBLICATION_DAY = 23, | 153 | EXTRACTOR_METATYPE_PUBLICATION_DAY = 23, |
154 | EXTRACTOR_METATYPE_PUBLICATION_DATE = 24, | 154 | EXTRACTOR_METATYPE_PUBLICATION_DATE = 24, |
155 | EXTRACTOR_METATYPE_BIBTEX_EPRINT = 25, | 155 | EXTRACTOR_METATYPE_BIBTEX_EPRINT = 25, |
156 | EXTRACTOR_METATYPE_BIBTEX_ENTRY_TYPE = 26, | 156 | EXTRACTOR_METATYPE_BIBTEX_ENTRY_TYPE = 26, |
157 | EXTRACTOR_METATYPE_LANGUAGE = 27, | 157 | EXTRACTOR_METATYPE_LANGUAGE = 27, |
158 | EXTRACTOR_METATYPE_CREATION_TIME = 28, | 158 | EXTRACTOR_METATYPE_CREATION_TIME = 28, |
159 | EXTRACTOR_METATYPE_URL = 29, | 159 | EXTRACTOR_METATYPE_URL = 29, |
160 | 160 | ||
161 | /* "unique" document identifiers */ | 161 | /* "unique" document identifiers */ |
162 | EXTRACTOR_METATYPE_URI = 30, | 162 | EXTRACTOR_METATYPE_URI = 30, |
163 | EXTRACTOR_METATYPE_ISRC = 31, | 163 | EXTRACTOR_METATYPE_ISRC = 31, |
164 | EXTRACTOR_METATYPE_HASH_MD4 = 32, | 164 | EXTRACTOR_METATYPE_HASH_MD4 = 32, |
165 | EXTRACTOR_METATYPE_HASH_MD5 = 33, | 165 | EXTRACTOR_METATYPE_HASH_MD5 = 33, |
166 | EXTRACTOR_METATYPE_HASH_SHA0 = 34, | 166 | EXTRACTOR_METATYPE_HASH_SHA0 = 34, |
167 | EXTRACTOR_METATYPE_HASH_SHA1 = 35, | 167 | EXTRACTOR_METATYPE_HASH_SHA1 = 35, |
168 | EXTRACTOR_METATYPE_HASH_RMD160 = 36, | 168 | EXTRACTOR_METATYPE_HASH_RMD160 = 36, |
169 | 169 | ||
170 | /* identifiers of a location */ | 170 | /* identifiers of a location */ |
171 | EXTRACTOR_METATYPE_GPS_LATITUDE_REF = 37, | 171 | EXTRACTOR_METATYPE_GPS_LATITUDE_REF = 37, |
172 | EXTRACTOR_METATYPE_GPS_LATITUDE = 38, | 172 | EXTRACTOR_METATYPE_GPS_LATITUDE = 38, |
173 | EXTRACTOR_METATYPE_GPS_LONGITUDE_REF = 39, | 173 | EXTRACTOR_METATYPE_GPS_LONGITUDE_REF = 39, |
174 | EXTRACTOR_METATYPE_GPS_LONGITUDE = 40, | 174 | EXTRACTOR_METATYPE_GPS_LONGITUDE = 40, |
175 | EXTRACTOR_METATYPE_LOCATION_CITY = 41, | 175 | EXTRACTOR_METATYPE_LOCATION_CITY = 41, |
176 | EXTRACTOR_METATYPE_LOCATION_SUBLOCATION = 42, | 176 | EXTRACTOR_METATYPE_LOCATION_SUBLOCATION = 42, |
177 | EXTRACTOR_METATYPE_LOCATION_COUNTRY = 43, | 177 | EXTRACTOR_METATYPE_LOCATION_COUNTRY = 43, |
178 | EXTRACTOR_METATYPE_LOCATION_COUNTRY_CODE = 44, | 178 | EXTRACTOR_METATYPE_LOCATION_COUNTRY_CODE = 44, |
179 | 179 | ||
180 | /* generic attributes */ | 180 | /* generic attributes */ |
181 | EXTRACTOR_METATYPE_UNKNOWN = 45, | 181 | EXTRACTOR_METATYPE_UNKNOWN = 45, |
182 | EXTRACTOR_METATYPE_DESCRIPTION = 46, | 182 | EXTRACTOR_METATYPE_DESCRIPTION = 46, |
183 | EXTRACTOR_METATYPE_COPYRIGHT = 47, | 183 | EXTRACTOR_METATYPE_COPYRIGHT = 47, |
184 | EXTRACTOR_METATYPE_RIGHTS = 48, | 184 | EXTRACTOR_METATYPE_RIGHTS = 48, |
185 | EXTRACTOR_METATYPE_KEYWORDS = 49, | 185 | EXTRACTOR_METATYPE_KEYWORDS = 49, |
186 | EXTRACTOR_METATYPE_ABSTRACT = 50, | 186 | EXTRACTOR_METATYPE_ABSTRACT = 50, |
187 | EXTRACTOR_METATYPE_SUMMARY = 51, | 187 | EXTRACTOR_METATYPE_SUMMARY = 51, |
188 | EXTRACTOR_METATYPE_SUBJECT = 52, | 188 | EXTRACTOR_METATYPE_SUBJECT = 52, |
189 | EXTRACTOR_METATYPE_CREATOR = 53, | 189 | EXTRACTOR_METATYPE_CREATOR = 53, |
190 | EXTRACTOR_METATYPE_FORMAT = 54, | 190 | EXTRACTOR_METATYPE_FORMAT = 54, |
191 | EXTRACTOR_METATYPE_FORMAT_VERSION = 55, | 191 | EXTRACTOR_METATYPE_FORMAT_VERSION = 55, |
192 | 192 | ||
193 | /* processing history */ | 193 | /* processing history */ |
194 | EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE = 56, | 194 | EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE = 56, |
195 | EXTRACTOR_METATYPE_UNKNOWN_DATE = 57, | 195 | EXTRACTOR_METATYPE_UNKNOWN_DATE = 57, |
196 | EXTRACTOR_METATYPE_CREATION_DATE = 58, | 196 | EXTRACTOR_METATYPE_CREATION_DATE = 58, |
197 | EXTRACTOR_METATYPE_MODIFICATION_DATE = 59, | 197 | EXTRACTOR_METATYPE_MODIFICATION_DATE = 59, |
198 | EXTRACTOR_METATYPE_LAST_PRINTED = 60, | 198 | EXTRACTOR_METATYPE_LAST_PRINTED = 60, |
199 | EXTRACTOR_METATYPE_LAST_SAVED_BY = 61, | 199 | EXTRACTOR_METATYPE_LAST_SAVED_BY = 61, |
200 | EXTRACTOR_METATYPE_TOTAL_EDITING_TIME = 62, | 200 | EXTRACTOR_METATYPE_TOTAL_EDITING_TIME = 62, |
201 | EXTRACTOR_METATYPE_EDITING_CYCLES = 63, | 201 | EXTRACTOR_METATYPE_EDITING_CYCLES = 63, |
202 | EXTRACTOR_METATYPE_MODIFIED_BY_SOFTWARE = 64, | 202 | EXTRACTOR_METATYPE_MODIFIED_BY_SOFTWARE = 64, |
203 | EXTRACTOR_METATYPE_REVISION_HISTORY = 65, | 203 | EXTRACTOR_METATYPE_REVISION_HISTORY = 65, |
204 | 204 | ||
205 | EXTRACTOR_METATYPE_EMBEDDED_FILE_SIZE = 66, | 205 | EXTRACTOR_METATYPE_EMBEDDED_FILE_SIZE = 66, |
206 | EXTRACTOR_METATYPE_FINDER_FILE_TYPE = 67, | 206 | EXTRACTOR_METATYPE_FINDER_FILE_TYPE = 67, |
207 | EXTRACTOR_METATYPE_FINDER_FILE_CREATOR = 68, | 207 | EXTRACTOR_METATYPE_FINDER_FILE_CREATOR = 68, |
208 | 208 | ||
209 | /* software package specifics (deb, rpm, tgz, elf) */ | 209 | /* software package specifics (deb, rpm, tgz, elf) */ |
210 | EXTRACTOR_METATYPE_PACKAGE_NAME = 69, | 210 | EXTRACTOR_METATYPE_PACKAGE_NAME = 69, |
211 | EXTRACTOR_METATYPE_PACKAGE_VERSION = 70, | 211 | EXTRACTOR_METATYPE_PACKAGE_VERSION = 70, |
212 | EXTRACTOR_METATYPE_SECTION = 71, | 212 | EXTRACTOR_METATYPE_SECTION = 71, |
213 | EXTRACTOR_METATYPE_UPLOAD_PRIORITY = 72, | 213 | EXTRACTOR_METATYPE_UPLOAD_PRIORITY = 72, |
214 | EXTRACTOR_METATYPE_PACKAGE_DEPENDENCY = 73, | 214 | EXTRACTOR_METATYPE_PACKAGE_DEPENDENCY = 73, |
215 | EXTRACTOR_METATYPE_PACKAGE_CONFLICTS = 74, | 215 | EXTRACTOR_METATYPE_PACKAGE_CONFLICTS = 74, |
216 | EXTRACTOR_METATYPE_PACKAGE_REPLACES = 75, | 216 | EXTRACTOR_METATYPE_PACKAGE_REPLACES = 75, |
217 | EXTRACTOR_METATYPE_PACKAGE_PROVIDES = 76, | 217 | EXTRACTOR_METATYPE_PACKAGE_PROVIDES = 76, |
218 | EXTRACTOR_METATYPE_PACKAGE_RECOMMENDS = 77, | 218 | EXTRACTOR_METATYPE_PACKAGE_RECOMMENDS = 77, |
219 | EXTRACTOR_METATYPE_PACKAGE_SUGGESTS = 78, | 219 | EXTRACTOR_METATYPE_PACKAGE_SUGGESTS = 78, |
220 | EXTRACTOR_METATYPE_PACKAGE_MAINTAINER = 79, | 220 | EXTRACTOR_METATYPE_PACKAGE_MAINTAINER = 79, |
221 | EXTRACTOR_METATYPE_PACKAGE_INSTALLED_SIZE = 80, | 221 | EXTRACTOR_METATYPE_PACKAGE_INSTALLED_SIZE = 80, |
222 | EXTRACTOR_METATYPE_PACKAGE_SOURCE = 81, | 222 | EXTRACTOR_METATYPE_PACKAGE_SOURCE = 81, |
223 | EXTRACTOR_METATYPE_PACKAGE_ESSENTIAL = 82, | 223 | EXTRACTOR_METATYPE_PACKAGE_ESSENTIAL = 82, |
224 | EXTRACTOR_METATYPE_TARGET_ARCHITECTURE = 83, | 224 | EXTRACTOR_METATYPE_TARGET_ARCHITECTURE = 83, |
225 | EXTRACTOR_METATYPE_PACKAGE_PRE_DEPENDENCY = 84, | 225 | EXTRACTOR_METATYPE_PACKAGE_PRE_DEPENDENCY = 84, |
226 | EXTRACTOR_METATYPE_LICENSE = 85, | 226 | EXTRACTOR_METATYPE_LICENSE = 85, |
227 | EXTRACTOR_METATYPE_PACKAGE_DISTRIBUTION = 86, | 227 | EXTRACTOR_METATYPE_PACKAGE_DISTRIBUTION = 86, |
228 | EXTRACTOR_METATYPE_BUILDHOST = 87, | 228 | EXTRACTOR_METATYPE_BUILDHOST = 87, |
229 | EXTRACTOR_METATYPE_VENDOR = 88, | 229 | EXTRACTOR_METATYPE_VENDOR = 88, |
230 | EXTRACTOR_METATYPE_TARGET_OS = 89, | 230 | EXTRACTOR_METATYPE_TARGET_OS = 89, |
231 | EXTRACTOR_METATYPE_SOFTWARE_VERSION = 90, | 231 | EXTRACTOR_METATYPE_SOFTWARE_VERSION = 90, |
232 | EXTRACTOR_METATYPE_TARGET_PLATFORM = 91, | 232 | EXTRACTOR_METATYPE_TARGET_PLATFORM = 91, |
233 | EXTRACTOR_METATYPE_RESOURCE_TYPE = 92, | 233 | EXTRACTOR_METATYPE_RESOURCE_TYPE = 92, |
234 | EXTRACTOR_METATYPE_LIBRARY_SEARCH_PATH = 93, | 234 | EXTRACTOR_METATYPE_LIBRARY_SEARCH_PATH = 93, |
235 | EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY = 94, | 235 | EXTRACTOR_METATYPE_LIBRARY_DEPENDENCY = 94, |
236 | 236 | ||
237 | /* photography specifics */ | 237 | /* photography specifics */ |
238 | EXTRACTOR_METATYPE_CAMERA_MAKE = 95, | 238 | EXTRACTOR_METATYPE_CAMERA_MAKE = 95, |
239 | EXTRACTOR_METATYPE_CAMERA_MODEL = 96, | 239 | EXTRACTOR_METATYPE_CAMERA_MODEL = 96, |
240 | EXTRACTOR_METATYPE_EXPOSURE = 97, | 240 | EXTRACTOR_METATYPE_EXPOSURE = 97, |
241 | EXTRACTOR_METATYPE_APERTURE = 98, | 241 | EXTRACTOR_METATYPE_APERTURE = 98, |
242 | EXTRACTOR_METATYPE_EXPOSURE_BIAS = 99, | 242 | EXTRACTOR_METATYPE_EXPOSURE_BIAS = 99, |
243 | EXTRACTOR_METATYPE_FLASH = 100, | 243 | EXTRACTOR_METATYPE_FLASH = 100, |
244 | EXTRACTOR_METATYPE_FLASH_BIAS = 101, | 244 | EXTRACTOR_METATYPE_FLASH_BIAS = 101, |
245 | EXTRACTOR_METATYPE_FOCAL_LENGTH = 102, | 245 | EXTRACTOR_METATYPE_FOCAL_LENGTH = 102, |
246 | EXTRACTOR_METATYPE_FOCAL_LENGTH_35MM = 103, | 246 | EXTRACTOR_METATYPE_FOCAL_LENGTH_35MM = 103, |
247 | EXTRACTOR_METATYPE_ISO_SPEED = 104, | 247 | EXTRACTOR_METATYPE_ISO_SPEED = 104, |
248 | EXTRACTOR_METATYPE_EXPOSURE_MODE = 105, | 248 | EXTRACTOR_METATYPE_EXPOSURE_MODE = 105, |
249 | EXTRACTOR_METATYPE_METERING_MODE = 106, | 249 | EXTRACTOR_METATYPE_METERING_MODE = 106, |
250 | EXTRACTOR_METATYPE_MACRO_MODE = 107, | 250 | EXTRACTOR_METATYPE_MACRO_MODE = 107, |
251 | EXTRACTOR_METATYPE_IMAGE_QUALITY = 108, | 251 | EXTRACTOR_METATYPE_IMAGE_QUALITY = 108, |
252 | EXTRACTOR_METATYPE_WHITE_BALANCE = 109, | 252 | EXTRACTOR_METATYPE_WHITE_BALANCE = 109, |
253 | EXTRACTOR_METATYPE_ORIENTATION = 110, | 253 | EXTRACTOR_METATYPE_ORIENTATION = 110, |
254 | EXTRACTOR_METATYPE_MAGNIFICATION = 111, | 254 | EXTRACTOR_METATYPE_MAGNIFICATION = 111, |
255 | 255 | ||
256 | /* image specifics */ | 256 | /* image specifics */ |
257 | EXTRACTOR_METATYPE_IMAGE_DIMENSIONS = 112, | 257 | EXTRACTOR_METATYPE_IMAGE_DIMENSIONS = 112, |
258 | EXTRACTOR_METATYPE_PRODUCED_BY_SOFTWARE = 113, | 258 | EXTRACTOR_METATYPE_PRODUCED_BY_SOFTWARE = 113, |
259 | EXTRACTOR_METATYPE_THUMBNAIL = 114, | 259 | EXTRACTOR_METATYPE_THUMBNAIL = 114, |
260 | EXTRACTOR_METATYPE_IMAGE_RESOLUTION = 115, | 260 | EXTRACTOR_METATYPE_IMAGE_RESOLUTION = 115, |
261 | EXTRACTOR_METATYPE_SOURCE = 116, | 261 | EXTRACTOR_METATYPE_SOURCE = 116, |
262 | 262 | ||
263 | /* (text) document processing specifics */ | 263 | /* (text) document processing specifics */ |
264 | EXTRACTOR_METATYPE_CHARACTER_SET = 117, | 264 | EXTRACTOR_METATYPE_CHARACTER_SET = 117, |
265 | EXTRACTOR_METATYPE_LINE_COUNT = 118, | 265 | EXTRACTOR_METATYPE_LINE_COUNT = 118, |
266 | EXTRACTOR_METATYPE_PARAGRAPH_COUNT = 119, | 266 | EXTRACTOR_METATYPE_PARAGRAPH_COUNT = 119, |
267 | EXTRACTOR_METATYPE_WORD_COUNT = 120, | 267 | EXTRACTOR_METATYPE_WORD_COUNT = 120, |
268 | EXTRACTOR_METATYPE_CHARACTER_COUNT = 121, | 268 | EXTRACTOR_METATYPE_CHARACTER_COUNT = 121, |
269 | EXTRACTOR_METATYPE_PAGE_ORIENTATION = 122, | 269 | EXTRACTOR_METATYPE_PAGE_ORIENTATION = 122, |
270 | EXTRACTOR_METATYPE_PAPER_SIZE = 123, | 270 | EXTRACTOR_METATYPE_PAPER_SIZE = 123, |
271 | EXTRACTOR_METATYPE_TEMPLATE = 124, | 271 | EXTRACTOR_METATYPE_TEMPLATE = 124, |
272 | EXTRACTOR_METATYPE_COMPANY = 125, | 272 | EXTRACTOR_METATYPE_COMPANY = 125, |
273 | EXTRACTOR_METATYPE_MANAGER = 126, | 273 | EXTRACTOR_METATYPE_MANAGER = 126, |
274 | EXTRACTOR_METATYPE_REVISION_NUMBER = 127, | 274 | EXTRACTOR_METATYPE_REVISION_NUMBER = 127, |
275 | 275 | ||
276 | /* music / video specifics */ | 276 | /* music / video specifics */ |
277 | EXTRACTOR_METATYPE_DURATION = 128, | 277 | EXTRACTOR_METATYPE_DURATION = 128, |
278 | EXTRACTOR_METATYPE_ALBUM = 129, | 278 | EXTRACTOR_METATYPE_ALBUM = 129, |
279 | EXTRACTOR_METATYPE_ARTIST = 130, | 279 | EXTRACTOR_METATYPE_ARTIST = 130, |
280 | EXTRACTOR_METATYPE_GENRE = 131, | 280 | EXTRACTOR_METATYPE_GENRE = 131, |
281 | EXTRACTOR_METATYPE_TRACK_NUMBER = 132, | 281 | EXTRACTOR_METATYPE_TRACK_NUMBER = 132, |
282 | EXTRACTOR_METATYPE_DISC_NUMBER = 133, | 282 | EXTRACTOR_METATYPE_DISC_NUMBER = 133, |
283 | EXTRACTOR_METATYPE_PERFORMER = 134, | 283 | EXTRACTOR_METATYPE_PERFORMER = 134, |
284 | EXTRACTOR_METATYPE_CONTACT_INFORMATION = 135, | 284 | EXTRACTOR_METATYPE_CONTACT_INFORMATION = 135, |
285 | EXTRACTOR_METATYPE_SONG_VERSION = 136, | 285 | EXTRACTOR_METATYPE_SONG_VERSION = 136, |
286 | EXTRACTOR_METATYPE_PICTURE = 137, | 286 | EXTRACTOR_METATYPE_PICTURE = 137, |
287 | EXTRACTOR_METATYPE_COVER_PICTURE = 138, | 287 | EXTRACTOR_METATYPE_COVER_PICTURE = 138, |
288 | EXTRACTOR_METATYPE_CONTRIBUTOR_PICTURE = 139, | 288 | EXTRACTOR_METATYPE_CONTRIBUTOR_PICTURE = 139, |
289 | EXTRACTOR_METATYPE_EVENT_PICTURE = 140, | 289 | EXTRACTOR_METATYPE_EVENT_PICTURE = 140, |
290 | EXTRACTOR_METATYPE_LOGO = 141, | 290 | EXTRACTOR_METATYPE_LOGO = 141, |
291 | EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM = 142, | 291 | EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM = 142, |
292 | EXTRACTOR_METATYPE_SOURCE_DEVICE = 143, | 292 | EXTRACTOR_METATYPE_SOURCE_DEVICE = 143, |
293 | EXTRACTOR_METATYPE_DISCLAIMER = 144, | 293 | EXTRACTOR_METATYPE_DISCLAIMER = 144, |
294 | EXTRACTOR_METATYPE_WARNING = 145, | 294 | EXTRACTOR_METATYPE_WARNING = 145, |
295 | EXTRACTOR_METATYPE_PAGE_ORDER = 146, | 295 | EXTRACTOR_METATYPE_PAGE_ORDER = 146, |
296 | EXTRACTOR_METATYPE_WRITER = 147, | 296 | EXTRACTOR_METATYPE_WRITER = 147, |
297 | EXTRACTOR_METATYPE_PRODUCT_VERSION = 148, | 297 | EXTRACTOR_METATYPE_PRODUCT_VERSION = 148, |
298 | EXTRACTOR_METATYPE_CONTRIBUTOR_NAME = 149, | 298 | EXTRACTOR_METATYPE_CONTRIBUTOR_NAME = 149, |
299 | EXTRACTOR_METATYPE_MOVIE_DIRECTOR = 150, | 299 | EXTRACTOR_METATYPE_MOVIE_DIRECTOR = 150, |
300 | EXTRACTOR_METATYPE_NETWORK_NAME = 151, | 300 | EXTRACTOR_METATYPE_NETWORK_NAME = 151, |
301 | EXTRACTOR_METATYPE_SHOW_NAME = 152, | 301 | EXTRACTOR_METATYPE_SHOW_NAME = 152, |
302 | EXTRACTOR_METATYPE_CHAPTER_NAME = 153, | 302 | EXTRACTOR_METATYPE_CHAPTER_NAME = 153, |
303 | EXTRACTOR_METATYPE_SONG_COUNT = 154, | 303 | EXTRACTOR_METATYPE_SONG_COUNT = 154, |
304 | EXTRACTOR_METATYPE_STARTING_SONG = 155, | 304 | EXTRACTOR_METATYPE_STARTING_SONG = 155, |
305 | EXTRACTOR_METATYPE_PLAY_COUNTER = 156, | 305 | EXTRACTOR_METATYPE_PLAY_COUNTER = 156, |
306 | EXTRACTOR_METATYPE_CONDUCTOR = 157, | 306 | EXTRACTOR_METATYPE_CONDUCTOR = 157, |
307 | EXTRACTOR_METATYPE_INTERPRETATION = 158, | 307 | EXTRACTOR_METATYPE_INTERPRETATION = 158, |
308 | EXTRACTOR_METATYPE_COMPOSER = 159, | 308 | EXTRACTOR_METATYPE_COMPOSER = 159, |
309 | EXTRACTOR_METATYPE_BEATS_PER_MINUTE = 160, | 309 | EXTRACTOR_METATYPE_BEATS_PER_MINUTE = 160, |
310 | EXTRACTOR_METATYPE_ENCODED_BY = 161, | 310 | EXTRACTOR_METATYPE_ENCODED_BY = 161, |
311 | EXTRACTOR_METATYPE_ORIGINAL_TITLE = 162, | 311 | EXTRACTOR_METATYPE_ORIGINAL_TITLE = 162, |
312 | EXTRACTOR_METATYPE_ORIGINAL_ARTIST = 163, | 312 | EXTRACTOR_METATYPE_ORIGINAL_ARTIST = 163, |
313 | EXTRACTOR_METATYPE_ORIGINAL_WRITER = 164, | 313 | EXTRACTOR_METATYPE_ORIGINAL_WRITER = 164, |
314 | EXTRACTOR_METATYPE_ORIGINAL_RELEASE_YEAR = 165, | 314 | EXTRACTOR_METATYPE_ORIGINAL_RELEASE_YEAR = 165, |
315 | EXTRACTOR_METATYPE_ORIGINAL_PERFORMER = 166, | 315 | EXTRACTOR_METATYPE_ORIGINAL_PERFORMER = 166, |
316 | EXTRACTOR_METATYPE_LYRICS = 167, | 316 | EXTRACTOR_METATYPE_LYRICS = 167, |
317 | EXTRACTOR_METATYPE_POPULARITY_METER = 168, | 317 | EXTRACTOR_METATYPE_POPULARITY_METER = 168, |
318 | EXTRACTOR_METATYPE_LICENSEE = 169, | 318 | EXTRACTOR_METATYPE_LICENSEE = 169, |
319 | EXTRACTOR_METATYPE_MUSICIAN_CREDITS_LIST = 170, | 319 | EXTRACTOR_METATYPE_MUSICIAN_CREDITS_LIST = 170, |
320 | EXTRACTOR_METATYPE_MOOD = 171, | 320 | EXTRACTOR_METATYPE_MOOD = 171, |
321 | EXTRACTOR_METATYPE_SUBTITLE = 172, | 321 | EXTRACTOR_METATYPE_SUBTITLE = 172, |
322 | 322 | ||
323 | /* GNUnet specific values (never extracted) */ | 323 | /* GNUnet specific values (never extracted) */ |
324 | EXTRACTOR_METATYPE_GNUNET_DISPLAY_TYPE = 173, | 324 | EXTRACTOR_METATYPE_GNUNET_DISPLAY_TYPE = 173, |
325 | EXTRACTOR_METATYPE_GNUNET_FULL_DATA = 174, | 325 | EXTRACTOR_METATYPE_GNUNET_FULL_DATA = 174, |
326 | EXTRACTOR_METATYPE_RATING = 175, | 326 | EXTRACTOR_METATYPE_RATING = 175, |
327 | EXTRACTOR_METATYPE_ORGANIZATION = 176, | 327 | EXTRACTOR_METATYPE_ORGANIZATION = 176, |
328 | EXTRACTOR_METATYPE_RIPPER = 177, | 328 | EXTRACTOR_METATYPE_RIPPER = 177, |
329 | EXTRACTOR_METATYPE_PRODUCER = 178, | 329 | EXTRACTOR_METATYPE_PRODUCER = 178, |
330 | EXTRACTOR_METATYPE_GROUP = 179, | 330 | EXTRACTOR_METATYPE_GROUP = 179, |
331 | EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME = 180, | 331 | EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME = 180, |
332 | 332 | ||
333 | EXTRACTOR_METATYPE_DISC_COUNT = 181, | 333 | EXTRACTOR_METATYPE_DISC_COUNT = 181, |
334 | 334 | ||
335 | EXTRACTOR_METATYPE_CODEC = 182, | 335 | EXTRACTOR_METATYPE_CODEC = 182, |
336 | EXTRACTOR_METATYPE_VIDEO_CODEC = 183, | 336 | EXTRACTOR_METATYPE_VIDEO_CODEC = 183, |
337 | EXTRACTOR_METATYPE_AUDIO_CODEC = 184, | 337 | EXTRACTOR_METATYPE_AUDIO_CODEC = 184, |
338 | EXTRACTOR_METATYPE_SUBTITLE_CODEC = 185, | 338 | EXTRACTOR_METATYPE_SUBTITLE_CODEC = 185, |
339 | 339 | ||
340 | EXTRACTOR_METATYPE_CONTAINER_FORMAT = 186, | 340 | EXTRACTOR_METATYPE_CONTAINER_FORMAT = 186, |
341 | 341 | ||
342 | EXTRACTOR_METATYPE_BITRATE = 187, | 342 | EXTRACTOR_METATYPE_BITRATE = 187, |
343 | EXTRACTOR_METATYPE_NOMINAL_BITRATE = 188, | 343 | EXTRACTOR_METATYPE_NOMINAL_BITRATE = 188, |
344 | EXTRACTOR_METATYPE_MINIMUM_BITRATE = 189, | 344 | EXTRACTOR_METATYPE_MINIMUM_BITRATE = 189, |
345 | EXTRACTOR_METATYPE_MAXIMUM_BITRATE = 190, | 345 | EXTRACTOR_METATYPE_MAXIMUM_BITRATE = 190, |
346 | 346 | ||
347 | EXTRACTOR_METATYPE_SERIAL = 191, | 347 | EXTRACTOR_METATYPE_SERIAL = 191, |
348 | 348 | ||
349 | EXTRACTOR_METATYPE_ENCODER = 192, | 349 | EXTRACTOR_METATYPE_ENCODER = 192, |
350 | EXTRACTOR_METATYPE_ENCODER_VERSION = 193, | 350 | EXTRACTOR_METATYPE_ENCODER_VERSION = 193, |
351 | 351 | ||
352 | EXTRACTOR_METATYPE_TRACK_GAIN = 194, | 352 | EXTRACTOR_METATYPE_TRACK_GAIN = 194, |
353 | EXTRACTOR_METATYPE_TRACK_PEAK = 195, | 353 | EXTRACTOR_METATYPE_TRACK_PEAK = 195, |
354 | EXTRACTOR_METATYPE_ALBUM_GAIN = 196, | 354 | EXTRACTOR_METATYPE_ALBUM_GAIN = 196, |
355 | EXTRACTOR_METATYPE_ALBUM_PEAK = 197, | 355 | EXTRACTOR_METATYPE_ALBUM_PEAK = 197, |
356 | EXTRACTOR_METATYPE_REFERENCE_LEVEL = 198, | 356 | EXTRACTOR_METATYPE_REFERENCE_LEVEL = 198, |
357 | 357 | ||
358 | EXTRACTOR_METATYPE_LOCATION_NAME = 199, | 358 | EXTRACTOR_METATYPE_LOCATION_NAME = 199, |
359 | EXTRACTOR_METATYPE_LOCATION_ELEVATION = 200, | 359 | EXTRACTOR_METATYPE_LOCATION_ELEVATION = 200, |
360 | EXTRACTOR_METATYPE_LOCATION_HORIZONTAL_ERROR = 201, | 360 | EXTRACTOR_METATYPE_LOCATION_HORIZONTAL_ERROR = 201, |
361 | EXTRACTOR_METATYPE_LOCATION_MOVEMENT_SPEED = 202, | 361 | EXTRACTOR_METATYPE_LOCATION_MOVEMENT_SPEED = 202, |
362 | EXTRACTOR_METATYPE_LOCATION_MOVEMENT_DIRECTION = 203, | 362 | EXTRACTOR_METATYPE_LOCATION_MOVEMENT_DIRECTION = 203, |
363 | EXTRACTOR_METATYPE_LOCATION_CAPTURE_DIRECTION = 204, | 363 | EXTRACTOR_METATYPE_LOCATION_CAPTURE_DIRECTION = 204, |
364 | 364 | ||
365 | EXTRACTOR_METATYPE_SHOW_EPISODE_NUMBER = 205, | 365 | EXTRACTOR_METATYPE_SHOW_EPISODE_NUMBER = 205, |
366 | EXTRACTOR_METATYPE_SHOW_SEASON_NUMBER = 206, | 366 | EXTRACTOR_METATYPE_SHOW_SEASON_NUMBER = 206, |
367 | 367 | ||
368 | EXTRACTOR_METATYPE_GROUPING = 207, | 368 | EXTRACTOR_METATYPE_GROUPING = 207, |
369 | 369 | ||
370 | EXTRACTOR_METATYPE_DEVICE_MANUFACTURER = 208, | 370 | EXTRACTOR_METATYPE_DEVICE_MANUFACTURER = 208, |
371 | EXTRACTOR_METATYPE_DEVICE_MODEL = 209, | 371 | EXTRACTOR_METATYPE_DEVICE_MODEL = 209, |
372 | 372 | ||
373 | EXTRACTOR_METATYPE_AUDIO_LANGUAGE = 210, | 373 | EXTRACTOR_METATYPE_AUDIO_LANGUAGE = 210, |
374 | EXTRACTOR_METATYPE_CHANNELS = 211, | 374 | EXTRACTOR_METATYPE_CHANNELS = 211, |
375 | EXTRACTOR_METATYPE_SAMPLE_RATE = 212, | 375 | EXTRACTOR_METATYPE_SAMPLE_RATE = 212, |
376 | EXTRACTOR_METATYPE_AUDIO_DEPTH = 213, | 376 | EXTRACTOR_METATYPE_AUDIO_DEPTH = 213, |
377 | EXTRACTOR_METATYPE_AUDIO_BITRATE = 214, | 377 | EXTRACTOR_METATYPE_AUDIO_BITRATE = 214, |
378 | EXTRACTOR_METATYPE_MAXIMUM_AUDIO_BITRATE = 215, | 378 | EXTRACTOR_METATYPE_MAXIMUM_AUDIO_BITRATE = 215, |
379 | 379 | ||
380 | EXTRACTOR_METATYPE_VIDEO_DIMENSIONS = 216, | 380 | EXTRACTOR_METATYPE_VIDEO_DIMENSIONS = 216, |
381 | EXTRACTOR_METATYPE_VIDEO_DEPTH = 217, | 381 | EXTRACTOR_METATYPE_VIDEO_DEPTH = 217, |
382 | EXTRACTOR_METATYPE_FRAME_RATE = 218, | 382 | EXTRACTOR_METATYPE_FRAME_RATE = 218, |
383 | EXTRACTOR_METATYPE_PIXEL_ASPECT_RATIO = 219, | 383 | EXTRACTOR_METATYPE_PIXEL_ASPECT_RATIO = 219, |
384 | EXTRACTOR_METATYPE_VIDEO_BITRATE = 220, | 384 | EXTRACTOR_METATYPE_VIDEO_BITRATE = 220, |
385 | EXTRACTOR_METATYPE_MAXIMUM_VIDEO_BITRATE = 221, | 385 | EXTRACTOR_METATYPE_MAXIMUM_VIDEO_BITRATE = 221, |
386 | 386 | ||
387 | EXTRACTOR_METATYPE_SUBTITLE_LANGUAGE = 222, | 387 | EXTRACTOR_METATYPE_SUBTITLE_LANGUAGE = 222, |
388 | EXTRACTOR_METATYPE_VIDEO_LANGUAGE = 223, | 388 | EXTRACTOR_METATYPE_VIDEO_LANGUAGE = 223, |
389 | 389 | ||
390 | EXTRACTOR_METATYPE_TOC = 224, | 390 | EXTRACTOR_METATYPE_TOC = 224, |
391 | 391 | ||
392 | EXTRACTOR_METATYPE_VIDEO_DURATION = 225, | 392 | EXTRACTOR_METATYPE_VIDEO_DURATION = 225, |
393 | EXTRACTOR_METATYPE_AUDIO_DURATION = 226, | 393 | EXTRACTOR_METATYPE_AUDIO_DURATION = 226, |
394 | EXTRACTOR_METATYPE_SUBTITLE_DURATION = 227, | 394 | EXTRACTOR_METATYPE_SUBTITLE_DURATION = 227, |
395 | 395 | ||
396 | EXTRACTOR_METATYPE_AUDIO_PREVIEW = 228, | 396 | EXTRACTOR_METATYPE_AUDIO_PREVIEW = 228, |
397 | 397 | ||
398 | EXTRACTOR_METATYPE_NARINFO = 229, | 398 | EXTRACTOR_METATYPE_NARINFO = 229, |
399 | EXTRACTOR_METATYPE_NAR = 230, | 399 | EXTRACTOR_METATYPE_NAR = 230, |
400 | 400 | ||
401 | EXTRACTOR_METATYPE_LAST = 231 | 401 | EXTRACTOR_METATYPE_LAST = 231 |
402 | }; | 402 | }; |
403 | 403 | ||
404 | /** @} */ /* end of meta data types */ | 404 | /** @} */ /* end of meta data types */ |
405 | 405 | ||
@@ -492,8 +492,8 @@ struct EXTRACTOR_ExtractContext | |||
492 | * -1 on error | 492 | * -1 on error |
493 | */ | 493 | */ |
494 | ssize_t (*read) (void *cls, | 494 | ssize_t (*read) (void *cls, |
495 | void **data, | 495 | void **data, |
496 | size_t size); | 496 | size_t size); |
497 | 497 | ||
498 | 498 | ||
499 | /** | 499 | /** |
@@ -507,8 +507,8 @@ struct EXTRACTOR_ExtractContext | |||
507 | * does not exist) | 507 | * does not exist) |
508 | */ | 508 | */ |
509 | int64_t (*seek) (void *cls, | 509 | int64_t (*seek) (void *cls, |
510 | int64_t pos, | 510 | int64_t pos, |
511 | int whence); | 511 | int whence); |
512 | 512 | ||
513 | 513 | ||
514 | /** | 514 | /** |
@@ -581,10 +581,10 @@ EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); | |||
581 | * @return the new list of libraries, equal to prev iff an error occured | 581 | * @return the new list of libraries, equal to prev iff an error occured |
582 | */ | 582 | */ |
583 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * | 583 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
584 | EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, | 584 | EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList *prev, |
585 | const char *library, | 585 | const char *library, |
586 | const char *options, | 586 | const char *options, |
587 | enum EXTRACTOR_Options flags); | 587 | enum EXTRACTOR_Options flags); |
588 | 588 | ||
589 | 589 | ||
590 | /** | 590 | /** |
@@ -604,8 +604,8 @@ EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, | |||
604 | */ | 604 | */ |
605 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * | 605 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
606 | EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, | 606 | EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, |
607 | const char *config, | 607 | const char *config, |
608 | enum EXTRACTOR_Options flags); | 608 | enum EXTRACTOR_Options flags); |
609 | 609 | ||
610 | 610 | ||
611 | /** | 611 | /** |
@@ -617,7 +617,7 @@ EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, | |||
617 | */ | 617 | */ |
618 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * | 618 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
619 | EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, | 619 | EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, |
620 | const char *library); | 620 | const char *library); |
621 | 621 | ||
622 | 622 | ||
623 | /** | 623 | /** |
@@ -642,11 +642,11 @@ EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); | |||
642 | */ | 642 | */ |
643 | _EXTRACTOR_EXTERN void | 643 | _EXTRACTOR_EXTERN void |
644 | EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, | 644 | EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, |
645 | const char *filename, | 645 | const char *filename, |
646 | const void *data, | 646 | const void *data, |
647 | size_t size, | 647 | size_t size, |
648 | EXTRACTOR_MetaDataProcessor proc, | 648 | EXTRACTOR_MetaDataProcessor proc, |
649 | void *proc_cls); | 649 | void *proc_cls); |
650 | 650 | ||
651 | 651 | ||
652 | /** | 652 | /** |
@@ -667,12 +667,12 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, | |||
667 | */ | 667 | */ |
668 | _EXTRACTOR_EXTERN int | 668 | _EXTRACTOR_EXTERN int |
669 | EXTRACTOR_meta_data_print (void *handle, | 669 | EXTRACTOR_meta_data_print (void *handle, |
670 | const char *plugin_name, | 670 | const char *plugin_name, |
671 | enum EXTRACTOR_MetaType type, | 671 | enum EXTRACTOR_MetaType type, |
672 | enum EXTRACTOR_MetaFormat format, | 672 | enum EXTRACTOR_MetaFormat format, |
673 | const char *data_mime_type, | 673 | const char *data_mime_type, |
674 | const char *data, | 674 | const char *data, |
675 | size_t data_len); | 675 | size_t data_len); |
676 | 676 | ||
677 | 677 | ||
678 | #if 0 /* keep Emacsens' auto-indent happy */ | 678 | #if 0 /* keep Emacsens' auto-indent happy */ |
diff --git a/src/include/gettext.h b/src/include/gettext.h index 774965b..98e6784 100644 --- a/src/include/gettext.h +++ b/src/include/gettext.h | |||
@@ -46,11 +46,11 @@ | |||
46 | # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) | 46 | # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) |
47 | # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) | 47 | # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) |
48 | # define ngettext(Msgid1, Msgid2, N) \ | 48 | # define ngettext(Msgid1, Msgid2, N) \ |
49 | ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) | 49 | ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) |
50 | # define dngettext(Domainname, Msgid1, Msgid2, N) \ | 50 | # define dngettext(Domainname, Msgid1, Msgid2, N) \ |
51 | ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) | 51 | ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) |
52 | # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ | 52 | # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ |
53 | ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) | 53 | ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) |
54 | /* slight modification here to avoid warnings: generate NO code, | 54 | /* slight modification here to avoid warnings: generate NO code, |
55 | not even the cast... */ | 55 | not even the cast... */ |
56 | # define textdomain(Domainname) | 56 | # define textdomain(Domainname) |
diff --git a/src/include/platform.h b/src/include/platform.h index 060ab5b..9f72f57 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -29,10 +29,10 @@ | |||
29 | #include "config.h" | 29 | #include "config.h" |
30 | #ifndef FRAMEWORK_BUILD | 30 | #ifndef FRAMEWORK_BUILD |
31 | #include "gettext.h" | 31 | #include "gettext.h" |
32 | #define _(a) dgettext(PACKAGE, a) | 32 | #define _(a) dgettext (PACKAGE, a) |
33 | #else | 33 | #else |
34 | #include "libintlemu.h" | 34 | #include "libintlemu.h" |
35 | #define _(a) dgettext("org.gnunet.libextractor", a) | 35 | #define _(a) dgettext ("org.gnunet.libextractor", a) |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #include "plibc.h" | 38 | #include "plibc.h" |
@@ -67,7 +67,7 @@ | |||
67 | #include <langinfo.h> | 67 | #include <langinfo.h> |
68 | 68 | ||
69 | #ifndef SIZE_MAX | 69 | #ifndef SIZE_MAX |
70 | #define SIZE_MAX ((size_t)-1) | 70 | #define SIZE_MAX ((size_t) -1) |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #if DARWIN | 73 | #if DARWIN |
@@ -75,12 +75,11 @@ | |||
75 | #include <mach-o/ldsyms.h> | 75 | #include <mach-o/ldsyms.h> |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #if !WINDOWS | 78 | #if ! WINDOWS |
79 | #define ABORT() abort() | 79 | #define ABORT() abort () |
80 | #else | 80 | #else |
81 | #define ABORT() DebugBreak () | 81 | #define ABORT() DebugBreak () |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | 84 | ||
85 | |||
86 | #endif | 85 | #endif |
diff --git a/src/include/plibc.h b/src/include/plibc.h index c8b6453..9199072 100644 --- a/src/include/plibc.h +++ b/src/include/plibc.h | |||
@@ -2,19 +2,19 @@ | |||
2 | This file is part of PlibC. | 2 | This file is part of PlibC. |
3 | Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Nils Durner (and other contributing authors) | 3 | Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Nils Durner (and other contributing authors) |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2.1 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. | 13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public | 15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with this library; if not, write to the Free Software | 16 | License along with this library; if not, write to the Free Software |
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 | */ | 18 | */ |
19 | 19 | ||
20 | /** | 20 | /** |
@@ -68,27 +68,28 @@ extern "C" { | |||
68 | #define __G_WIN32_H__ | 68 | #define __G_WIN32_H__ |
69 | 69 | ||
70 | /* Convert LARGE_INTEGER to double */ | 70 | /* Convert LARGE_INTEGER to double */ |
71 | #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \ | 71 | #define Li2Double(x) ((double) ((x).HighPart) * 4.294967296E9 \ |
72 | (double)((x).LowPart)) | 72 | + (double) ((x).LowPart)) |
73 | #ifndef HAVE_DECL__STATI64 | 73 | #ifndef HAVE_DECL__STATI64 |
74 | struct _stati64 | 74 | struct _stati64 |
75 | { | 75 | { |
76 | _dev_t st_dev; | 76 | _dev_t st_dev; |
77 | _ino_t st_ino; | 77 | _ino_t st_ino; |
78 | _mode_t st_mode; | 78 | _mode_t st_mode; |
79 | short st_nlink; | 79 | short st_nlink; |
80 | short st_uid; | 80 | short st_uid; |
81 | short st_gid; | 81 | short st_gid; |
82 | _dev_t st_rdev; | 82 | _dev_t st_rdev; |
83 | __int64 st_size; | 83 | __int64 st_size; |
84 | time_t st_atime; | 84 | time_t st_atime; |
85 | time_t st_mtime; | 85 | time_t st_mtime; |
86 | time_t st_ctime; | 86 | time_t st_ctime; |
87 | }; | 87 | }; |
88 | #endif | 88 | #endif |
89 | typedef unsigned int sa_family_t; | 89 | typedef unsigned int sa_family_t; |
90 | 90 | ||
91 | struct sockaddr_un { | 91 | struct sockaddr_un |
92 | { | ||
92 | short sun_family; /*AF_UNIX*/ | 93 | short sun_family; /*AF_UNIX*/ |
93 | char sun_path[108]; /*path name */ | 94 | char sun_path[108]; /*path name */ |
94 | }; | 95 | }; |
@@ -102,7 +103,7 @@ struct sockaddr_un { | |||
102 | #endif | 103 | #endif |
103 | 104 | ||
104 | #ifndef WEXITSTATUS | 105 | #ifndef WEXITSTATUS |
105 | #define WEXITSTATUS(status) (((status) & 0xff00) >> 8) | 106 | #define WEXITSTATUS(status) (((status) & 0xff00) >> 8) |
106 | #endif | 107 | #endif |
107 | 108 | ||
108 | #ifndef MSG_DONTWAIT | 109 | #ifndef MSG_DONTWAIT |
@@ -115,258 +116,258 @@ enum | |||
115 | _SC_PAGE_SIZE = 30 | 116 | _SC_PAGE_SIZE = 30 |
116 | }; | 117 | }; |
117 | 118 | ||
118 | #if !defined(EACCESS) | 119 | #if ! defined(EACCESS) |
119 | # define EACCESS EACCES | 120 | # define EACCESS EACCES |
120 | #endif | 121 | #endif |
121 | 122 | ||
122 | /* Thanks to the Cygwin project */ | 123 | /* Thanks to the Cygwin project */ |
123 | #if !defined(ENOCSI) | 124 | #if ! defined(ENOCSI) |
124 | # define ENOCSI 43 /* No CSI structure available */ | 125 | # define ENOCSI 43 /* No CSI structure available */ |
125 | #endif | 126 | #endif |
126 | #if !defined(EL2HLT) | 127 | #if ! defined(EL2HLT) |
127 | # define EL2HLT 44 /* Level 2 halted */ | 128 | # define EL2HLT 44 /* Level 2 halted */ |
128 | #endif | 129 | #endif |
129 | #if !defined(EDEADLK) | 130 | #if ! defined(EDEADLK) |
130 | # define EDEADLK 45 /* Deadlock condition */ | 131 | # define EDEADLK 45 /* Deadlock condition */ |
131 | #endif | 132 | #endif |
132 | #if !defined(ENOLCK) | 133 | #if ! defined(ENOLCK) |
133 | # define ENOLCK 46 /* No record locks available */ | 134 | # define ENOLCK 46 /* No record locks available */ |
134 | #endif | 135 | #endif |
135 | #if !defined(EBADE) | 136 | #if ! defined(EBADE) |
136 | # define EBADE 50 /* Invalid exchange */ | 137 | # define EBADE 50 /* Invalid exchange */ |
137 | #endif | 138 | #endif |
138 | #if !defined(EBADR) | 139 | #if ! defined(EBADR) |
139 | # define EBADR 51 /* Invalid request descriptor */ | 140 | # define EBADR 51 /* Invalid request descriptor */ |
140 | #endif | 141 | #endif |
141 | #if !defined(EXFULL) | 142 | #if ! defined(EXFULL) |
142 | # define EXFULL 52 /* Exchange full */ | 143 | # define EXFULL 52 /* Exchange full */ |
143 | #endif | 144 | #endif |
144 | #if !defined(ENOANO) | 145 | #if ! defined(ENOANO) |
145 | # define ENOANO 53 /* No anode */ | 146 | # define ENOANO 53 /* No anode */ |
146 | #endif | 147 | #endif |
147 | #if !defined(EBADRQC) | 148 | #if ! defined(EBADRQC) |
148 | # define EBADRQC 54 /* Invalid request code */ | 149 | # define EBADRQC 54 /* Invalid request code */ |
149 | #endif | 150 | #endif |
150 | #if !defined(EBADSLT) | 151 | #if ! defined(EBADSLT) |
151 | # define EBADSLT 55 /* Invalid slot */ | 152 | # define EBADSLT 55 /* Invalid slot */ |
152 | #endif | 153 | #endif |
153 | #if !defined(EDEADLOCK) | 154 | #if ! defined(EDEADLOCK) |
154 | # define EDEADLOCK EDEADLK /* File locking deadlock error */ | 155 | # define EDEADLOCK EDEADLK /* File locking deadlock error */ |
155 | #endif | 156 | #endif |
156 | #if !defined(EBFONT) | 157 | #if ! defined(EBFONT) |
157 | # define EBFONT 57 /* Bad font file fmt */ | 158 | # define EBFONT 57 /* Bad font file fmt */ |
158 | #endif | 159 | #endif |
159 | #if !defined(ENOSTR) | 160 | #if ! defined(ENOSTR) |
160 | # define ENOSTR 60 /* Device not a stream */ | 161 | # define ENOSTR 60 /* Device not a stream */ |
161 | #endif | 162 | #endif |
162 | #if !defined(ENODATA) | 163 | #if ! defined(ENODATA) |
163 | # define ENODATA 61 /* No data (for no delay io) */ | 164 | # define ENODATA 61 /* No data (for no delay io) */ |
164 | #endif | 165 | #endif |
165 | #if !defined(ETIME) | 166 | #if ! defined(ETIME) |
166 | # define ETIME 62 /* Timer expired */ | 167 | # define ETIME 62 /* Timer expired */ |
167 | #endif | 168 | #endif |
168 | #if !defined(ENOSR) | 169 | #if ! defined(ENOSR) |
169 | # define ENOSR 63 /* Out of streams resources */ | 170 | # define ENOSR 63 /* Out of streams resources */ |
170 | #endif | 171 | #endif |
171 | #if !defined(ENONET) | 172 | #if ! defined(ENONET) |
172 | # define ENONET 64 /* Machine is not on the network */ | 173 | # define ENONET 64 /* Machine is not on the network */ |
173 | #endif | 174 | #endif |
174 | #if !defined(ENOPKG) | 175 | #if ! defined(ENOPKG) |
175 | # define ENOPKG 65 /* Package not installed */ | 176 | # define ENOPKG 65 /* Package not installed */ |
176 | #endif | 177 | #endif |
177 | #if !defined(EREMOTE) | 178 | #if ! defined(EREMOTE) |
178 | # define EREMOTE 66 /* The object is remote */ | 179 | # define EREMOTE 66 /* The object is remote */ |
179 | #endif | 180 | #endif |
180 | #if !defined(ENOLINK) | 181 | #if ! defined(ENOLINK) |
181 | # define ENOLINK 67 /* The link has been severed */ | 182 | # define ENOLINK 67 /* The link has been severed */ |
182 | #endif | 183 | #endif |
183 | #if !defined(EADV) | 184 | #if ! defined(EADV) |
184 | # define EADV 68 /* Advertise error */ | 185 | # define EADV 68 /* Advertise error */ |
185 | #endif | 186 | #endif |
186 | #if !defined(ESRMNT) | 187 | #if ! defined(ESRMNT) |
187 | # define ESRMNT 69 /* Srmount error */ | 188 | # define ESRMNT 69 /* Srmount error */ |
188 | #endif | 189 | #endif |
189 | #if !defined(ECOMM) | 190 | #if ! defined(ECOMM) |
190 | # define ECOMM 70 /* Communication error on send */ | 191 | # define ECOMM 70 /* Communication error on send */ |
191 | #endif | 192 | #endif |
192 | #if !defined(EMULTIHOP) | 193 | #if ! defined(EMULTIHOP) |
193 | # define EMULTIHOP 74 /* Multihop attempted */ | 194 | # define EMULTIHOP 74 /* Multihop attempted */ |
194 | #endif | 195 | #endif |
195 | #if !defined(ELBIN) | 196 | #if ! defined(ELBIN) |
196 | # define ELBIN 75 /* Inode is remote (not really error) */ | 197 | # define ELBIN 75 /* Inode is remote (not really error) */ |
197 | #endif | 198 | #endif |
198 | #if !defined(EDOTDOT) | 199 | #if ! defined(EDOTDOT) |
199 | # define EDOTDOT 76 /* Cross mount point (not really error) */ | 200 | # define EDOTDOT 76 /* Cross mount point (not really error) */ |
200 | #endif | 201 | #endif |
201 | #if !defined(EBADMSG) | 202 | #if ! defined(EBADMSG) |
202 | # define EBADMSG 77 /* Trying to read unreadable message */ | 203 | # define EBADMSG 77 /* Trying to read unreadable message */ |
203 | #endif | 204 | #endif |
204 | #if !defined(ENOTUNIQ) | 205 | #if ! defined(ENOTUNIQ) |
205 | # define ENOTUNIQ 80 /* Given log. name not unique */ | 206 | # define ENOTUNIQ 80 /* Given log. name not unique */ |
206 | #endif | 207 | #endif |
207 | #if !defined(EBADFD) | 208 | #if ! defined(EBADFD) |
208 | # define EBADFD 81 /* f.d. invalid for this operation */ | 209 | # define EBADFD 81 /* f.d. invalid for this operation */ |
209 | #endif | 210 | #endif |
210 | #if !defined(EREMCHG) | 211 | #if ! defined(EREMCHG) |
211 | # define EREMCHG 82 /* Remote address changed */ | 212 | # define EREMCHG 82 /* Remote address changed */ |
212 | #endif | 213 | #endif |
213 | #if !defined(ELIBACC) | 214 | #if ! defined(ELIBACC) |
214 | # define ELIBACC 83 /* Can't access a needed shared lib */ | 215 | # define ELIBACC 83 /* Can't access a needed shared lib */ |
215 | #endif | 216 | #endif |
216 | #if !defined(ELIBBAD) | 217 | #if ! defined(ELIBBAD) |
217 | # define ELIBBAD 84 /* Accessing a corrupted shared lib */ | 218 | # define ELIBBAD 84 /* Accessing a corrupted shared lib */ |
218 | #endif | 219 | #endif |
219 | #if !defined(ELIBSCN) | 220 | #if ! defined(ELIBSCN) |
220 | # define ELIBSCN 85 /* .lib section in a.out corrupted */ | 221 | # define ELIBSCN 85 /* .lib section in a.out corrupted */ |
221 | #endif | 222 | #endif |
222 | #if !defined(ELIBMAX) | 223 | #if ! defined(ELIBMAX) |
223 | # define ELIBMAX 86 /* Attempting to link in too many libs */ | 224 | # define ELIBMAX 86 /* Attempting to link in too many libs */ |
224 | #endif | 225 | #endif |
225 | #if !defined(ELIBEXEC) | 226 | #if ! defined(ELIBEXEC) |
226 | # define ELIBEXEC 87 /* Attempting to exec a shared library */ | 227 | # define ELIBEXEC 87 /* Attempting to exec a shared library */ |
227 | #endif | 228 | #endif |
228 | #if !defined(ENOSYS) | 229 | #if ! defined(ENOSYS) |
229 | # define ENOSYS 88 /* Function not implemented */ | 230 | # define ENOSYS 88 /* Function not implemented */ |
230 | #endif | 231 | #endif |
231 | #if !defined(ENMFILE) | 232 | #if ! defined(ENMFILE) |
232 | # define ENMFILE 89 /* No more files */ | 233 | # define ENMFILE 89 /* No more files */ |
233 | #endif | 234 | #endif |
234 | #if !defined(ENOTEMPTY) | 235 | #if ! defined(ENOTEMPTY) |
235 | # define ENOTEMPTY 90 /* Directory not empty */ | 236 | # define ENOTEMPTY 90 /* Directory not empty */ |
236 | #endif | 237 | #endif |
237 | #if !defined(ENAMETOOLONG) | 238 | #if ! defined(ENAMETOOLONG) |
238 | # define ENAMETOOLONG 91 /* File or path name too long */ | 239 | # define ENAMETOOLONG 91 /* File or path name too long */ |
239 | #endif | 240 | #endif |
240 | #if !defined(EPFNOSUPPORT) | 241 | #if ! defined(EPFNOSUPPORT) |
241 | # define EPFNOSUPPORT 96 /* Protocol family not supported */ | 242 | # define EPFNOSUPPORT 96 /* Protocol family not supported */ |
242 | #endif | 243 | #endif |
243 | #if !defined(ENOSHARE) | 244 | #if ! defined(ENOSHARE) |
244 | # define ENOSHARE 97 /* No such host or network path */ | 245 | # define ENOSHARE 97 /* No such host or network path */ |
245 | #endif | 246 | #endif |
246 | #if !defined(ENOMEDIUM) | 247 | #if ! defined(ENOMEDIUM) |
247 | # define ENOMEDIUM 98 /* No medium (in tape drive) */ | 248 | # define ENOMEDIUM 98 /* No medium (in tape drive) */ |
248 | #endif | 249 | #endif |
249 | #if !defined(ESHUTDOWN) | 250 | #if ! defined(ESHUTDOWN) |
250 | # define ESHUTDOWN 99 /* Can't send after socket shutdown */ | 251 | # define ESHUTDOWN 99 /* Can't send after socket shutdown */ |
251 | #endif | 252 | #endif |
252 | #if !defined(EADDRINUSE) | 253 | #if ! defined(EADDRINUSE) |
253 | # define EADDRINUSE 100 /* Address already in use */ | 254 | # define EADDRINUSE 100 /* Address already in use */ |
254 | #endif | 255 | #endif |
255 | #if !defined(EADDRNOTAVAIL) | 256 | #if ! defined(EADDRNOTAVAIL) |
256 | # define EADDRNOTAVAIL 101 /* Address not available */ | 257 | # define EADDRNOTAVAIL 101 /* Address not available */ |
257 | #endif | 258 | #endif |
258 | #if !defined(EAFNOSUPPORT) | 259 | #if ! defined(EAFNOSUPPORT) |
259 | # define EAFNOSUPPORT 102 /* Address family not supported by protocol family */ | 260 | # define EAFNOSUPPORT 102 /* Address family not supported by protocol family */ |
260 | #endif | 261 | #endif |
261 | #if !defined(EALREADY) | 262 | #if ! defined(EALREADY) |
262 | # define EALREADY 103 /* Socket already connected */ | 263 | # define EALREADY 103 /* Socket already connected */ |
263 | #endif | 264 | #endif |
264 | #if !defined(ECANCELED) | 265 | #if ! defined(ECANCELED) |
265 | # define ECANCELED 105 /* Connection cancelled */ | 266 | # define ECANCELED 105 /* Connection cancelled */ |
266 | #endif | 267 | #endif |
267 | #if !defined(ECONNABORTED) | 268 | #if ! defined(ECONNABORTED) |
268 | # define ECONNABORTED 106 /* Connection aborted */ | 269 | # define ECONNABORTED 106 /* Connection aborted */ |
269 | #endif | 270 | #endif |
270 | #if !defined(ECONNREFUSED) | 271 | #if ! defined(ECONNREFUSED) |
271 | # define ECONNREFUSED 107 /* Connection refused */ | 272 | # define ECONNREFUSED 107 /* Connection refused */ |
272 | #endif | 273 | #endif |
273 | #if !defined(ECONNRESET) | 274 | #if ! defined(ECONNRESET) |
274 | # define ECONNRESET 108 /* Connection reset by peer */ | 275 | # define ECONNRESET 108 /* Connection reset by peer */ |
275 | #endif | 276 | #endif |
276 | #if !defined(EDESTADDRREQ) | 277 | #if ! defined(EDESTADDRREQ) |
277 | # define EDESTADDRREQ 109 /* Destination address required */ | 278 | # define EDESTADDRREQ 109 /* Destination address required */ |
278 | #endif | 279 | #endif |
279 | #if !defined(EHOSTUNREACH) | 280 | #if ! defined(EHOSTUNREACH) |
280 | # define EHOSTUNREACH 110 /* Host is unreachable */ | 281 | # define EHOSTUNREACH 110 /* Host is unreachable */ |
281 | #endif | 282 | #endif |
282 | #if !defined(ECONNABORTED) | 283 | #if ! defined(ECONNABORTED) |
283 | # define ECONNABORTED 111 /* Connection aborted */ | 284 | # define ECONNABORTED 111 /* Connection aborted */ |
284 | #endif | 285 | #endif |
285 | #if !defined(EINPROGRESS) | 286 | #if ! defined(EINPROGRESS) |
286 | # define EINPROGRESS 112 /* Connection already in progress */ | 287 | # define EINPROGRESS 112 /* Connection already in progress */ |
287 | #endif | 288 | #endif |
288 | #if !defined(EISCONN) | 289 | #if ! defined(EISCONN) |
289 | # define EISCONN 113 /* Socket is already connected */ | 290 | # define EISCONN 113 /* Socket is already connected */ |
290 | #endif | 291 | #endif |
291 | #if !defined(ELOOP) | 292 | #if ! defined(ELOOP) |
292 | # define ELOOP 114 /* Too many symbolic links */ | 293 | # define ELOOP 114 /* Too many symbolic links */ |
293 | #endif | 294 | #endif |
294 | #if !defined(EMSGSIZE) | 295 | #if ! defined(EMSGSIZE) |
295 | # define EMSGSIZE 115 /* Message too long */ | 296 | # define EMSGSIZE 115 /* Message too long */ |
296 | #endif | 297 | #endif |
297 | #if !defined(ENETDOWN) | 298 | #if ! defined(ENETDOWN) |
298 | # define ENETDOWN 116 /* Network interface is not configured */ | 299 | # define ENETDOWN 116 /* Network interface is not configured */ |
299 | #endif | 300 | #endif |
300 | #if !defined(ENETRESET) | 301 | #if ! defined(ENETRESET) |
301 | # define ENETRESET 117 /* Connection aborted by network */ | 302 | # define ENETRESET 117 /* Connection aborted by network */ |
302 | #endif | 303 | #endif |
303 | #if !defined(ENETUNREACH) | 304 | #if ! defined(ENETUNREACH) |
304 | # define ENETUNREACH 118 /* Network is unreachable */ | 305 | # define ENETUNREACH 118 /* Network is unreachable */ |
305 | #endif | 306 | #endif |
306 | #if !defined(ENOBUFS) | 307 | #if ! defined(ENOBUFS) |
307 | # define ENOBUFS 119 /* No buffer space available */ | 308 | # define ENOBUFS 119 /* No buffer space available */ |
308 | #endif | 309 | #endif |
309 | #if !defined(EHOSTDOWN) | 310 | #if ! defined(EHOSTDOWN) |
310 | # define EHOSTDOWN 120 /* Host is down */ | 311 | # define EHOSTDOWN 120 /* Host is down */ |
311 | #endif | 312 | #endif |
312 | #if !defined(EPROCLIM) | 313 | #if ! defined(EPROCLIM) |
313 | # define EPROCLIM 121 /* Too many processes */ | 314 | # define EPROCLIM 121 /* Too many processes */ |
314 | #endif | 315 | #endif |
315 | #if !defined(EDQUOT) | 316 | #if ! defined(EDQUOT) |
316 | # define EDQUOT 122 /* Disk quota exceeded */ | 317 | # define EDQUOT 122 /* Disk quota exceeded */ |
317 | #endif | 318 | #endif |
318 | #if !defined(ENOPROTOOPT) | 319 | #if ! defined(ENOPROTOOPT) |
319 | # define ENOPROTOOPT 123 /* Protocol not available */ | 320 | # define ENOPROTOOPT 123 /* Protocol not available */ |
320 | #endif | 321 | #endif |
321 | #if !defined(ESOCKTNOSUPPORT) | 322 | #if ! defined(ESOCKTNOSUPPORT) |
322 | # define ESOCKTNOSUPPORT 124 /* Socket type not supported */ | 323 | # define ESOCKTNOSUPPORT 124 /* Socket type not supported */ |
323 | #endif | 324 | #endif |
324 | #if !defined(ESTALE) | 325 | #if ! defined(ESTALE) |
325 | # define ESTALE 125 /* Unknown error */ | 326 | # define ESTALE 125 /* Unknown error */ |
326 | #endif | 327 | #endif |
327 | #if !defined(ENOTCONN) | 328 | #if ! defined(ENOTCONN) |
328 | # define ENOTCONN 126 /* Socket is not connected */ | 329 | # define ENOTCONN 126 /* Socket is not connected */ |
329 | #endif | 330 | #endif |
330 | #if !defined(ETOOMANYREFS) | 331 | #if ! defined(ETOOMANYREFS) |
331 | # define ETOOMANYREFS 127 /* Too many references: cannot splice */ | 332 | # define ETOOMANYREFS 127 /* Too many references: cannot splice */ |
332 | #endif | 333 | #endif |
333 | #if !defined(ENOTSOCK) | 334 | #if ! defined(ENOTSOCK) |
334 | # define ENOTSOCK 128 /* Socket operation on non-socket */ | 335 | # define ENOTSOCK 128 /* Socket operation on non-socket */ |
335 | #endif | 336 | #endif |
336 | #if !defined(ENOTSUP) | 337 | #if ! defined(ENOTSUP) |
337 | # define ENOTSUP 129 /* Not supported */ | 338 | # define ENOTSUP 129 /* Not supported */ |
338 | #endif | 339 | #endif |
339 | #if !defined(EOPNOTSUPP) | 340 | #if ! defined(EOPNOTSUPP) |
340 | # define EOPNOTSUPP 130 /* Operation not supported on transport endpoint */ | 341 | # define EOPNOTSUPP 130 /* Operation not supported on transport endpoint */ |
341 | #endif | 342 | #endif |
342 | #if !defined(EUSERS) | 343 | #if ! defined(EUSERS) |
343 | # define EUSERS 131 /* Too many users */ | 344 | # define EUSERS 131 /* Too many users */ |
344 | #endif | 345 | #endif |
345 | #if !defined(EOVERFLOW) | 346 | #if ! defined(EOVERFLOW) |
346 | # define EOVERFLOW 132 /* Value too large for defined data type */ | 347 | # define EOVERFLOW 132 /* Value too large for defined data type */ |
347 | #endif | 348 | #endif |
348 | #if !defined(EOWNERDEAD) | 349 | #if ! defined(EOWNERDEAD) |
349 | # define EOWNERDEAD 133 /* Unknown error */ | 350 | # define EOWNERDEAD 133 /* Unknown error */ |
350 | #endif | 351 | #endif |
351 | #if !defined(EPROTO) | 352 | #if ! defined(EPROTO) |
352 | # define EPROTO 134 /* Protocol error */ | 353 | # define EPROTO 134 /* Protocol error */ |
353 | #endif | 354 | #endif |
354 | #if !defined(EPROTONOSUPPORT) | 355 | #if ! defined(EPROTONOSUPPORT) |
355 | # define EPROTONOSUPPORT 135 /* Unknown protocol */ | 356 | # define EPROTONOSUPPORT 135 /* Unknown protocol */ |
356 | #endif | 357 | #endif |
357 | #if !defined(EPROTOTYPE) | 358 | #if ! defined(EPROTOTYPE) |
358 | # define EPROTOTYPE 136 /* Protocol wrong type for socket */ | 359 | # define EPROTOTYPE 136 /* Protocol wrong type for socket */ |
359 | #endif | 360 | #endif |
360 | #if !defined(ECASECLASH) | 361 | #if ! defined(ECASECLASH) |
361 | # define ECASECLASH 137 /* Filename exists with different case */ | 362 | # define ECASECLASH 137 /* Filename exists with different case */ |
362 | #endif | 363 | #endif |
363 | #if !defined(ETIMEDOUT) | 364 | #if ! defined(ETIMEDOUT) |
364 | /* Make sure it's the same as WSATIMEDOUT */ | 365 | /* Make sure it's the same as WSATIMEDOUT */ |
365 | # define ETIMEDOUT 138 /* Connection timed out */ | 366 | # define ETIMEDOUT 138 /* Connection timed out */ |
366 | #endif | 367 | #endif |
367 | #if !defined(EWOULDBLOCK) || EWOULDBLOCK == 140 | 368 | #if ! defined(EWOULDBLOCK) || EWOULDBLOCK == 140 |
368 | # undef EWOULDBLOCK /* MinGW-w64 defines it as 140, but we want it as EAGAIN */ | 369 | # undef EWOULDBLOCK /* MinGW-w64 defines it as 140, but we want it as EAGAIN */ |
369 | # define EWOULDBLOCK EAGAIN /* Operation would block */ | 370 | # define EWOULDBLOCK EAGAIN /* Operation would block */ |
370 | #endif | 371 | #endif |
371 | 372 | ||
372 | #undef HOST_NOT_FOUND | 373 | #undef HOST_NOT_FOUND |
@@ -384,7 +385,7 @@ enum | |||
384 | #define MAP_PRIVATE 0x2 /* unsupported */ | 385 | #define MAP_PRIVATE 0x2 /* unsupported */ |
385 | #define MAP_FIXED 0x10 | 386 | #define MAP_FIXED 0x10 |
386 | #define MAP_ANONYMOUS 0x20 /* unsupported */ | 387 | #define MAP_ANONYMOUS 0x20 /* unsupported */ |
387 | #define MAP_FAILED ((void *)-1) | 388 | #define MAP_FAILED ((void *) -1) |
388 | 389 | ||
389 | #define MS_ASYNC 1 /* sync memory asynchronously */ | 390 | #define MS_ASYNC 1 /* sync memory asynchronously */ |
390 | #define MS_INVALIDATE 2 /* invalidate the caches */ | 391 | #define MS_INVALIDATE 2 /* invalidate the caches */ |
@@ -403,7 +404,7 @@ struct statfs | |||
403 | long f_namelen; /* maximum length of filenames */ | 404 | long f_namelen; /* maximum length of filenames */ |
404 | long f_spare[6]; /* spare for later */ | 405 | long f_spare[6]; /* spare for later */ |
405 | }; | 406 | }; |
406 | #define sleep(secs) (Sleep(secs * 1000)) | 407 | #define sleep(secs) (Sleep (secs * 1000)) |
407 | 408 | ||
408 | /*********************** statfs *****************************/ | 409 | /*********************** statfs *****************************/ |
409 | /* fake block size */ | 410 | /* fake block size */ |
@@ -466,159 +467,265 @@ struct statfs | |||
466 | #define SIGKILL 9 | 467 | #define SIGKILL 9 |
467 | #define SIGTERM 15 | 468 | #define SIGTERM 15 |
468 | 469 | ||
469 | #define SetErrnoFromWinError(e) _SetErrnoFromWinError(e, __FILE__, __LINE__) | 470 | #define SetErrnoFromWinError(e) _SetErrnoFromWinError (e, __FILE__, __LINE__) |
471 | |||
472 | BOOL _plibc_CreateShortcut (const char *pszSrc, const char *pszDest); | ||
473 | |||
474 | BOOL _plibc_CreateShortcutW (const wchar_t *pwszSrc, const wchar_t *pwszDest); | ||
475 | |||
476 | BOOL _plibc_DereferenceShortcut (char *pszShortcut); | ||
477 | |||
478 | BOOL _plibc_DereferenceShortcutW (wchar_t *pwszShortcut); | ||
479 | |||
480 | char *plibc_ChooseDir (char *pszTitle, unsigned long ulFlags); | ||
481 | |||
482 | wchar_t *plibc_ChooseDirW (wchar_t *pwszTitle, unsigned long ulFlags); | ||
483 | |||
484 | char *plibc_ChooseFile (char *pszTitle, unsigned long ulFlags); | ||
485 | |||
486 | wchar_t *plibc_ChooseFileW (wchar_t *pwszTitle, unsigned long ulFlags); | ||
487 | |||
488 | long QueryRegistry (HKEY hMainKey, const char *pszKey, const char *pszSubKey, | ||
489 | char *pszBuffer, long *pdLength); | ||
490 | |||
491 | long QueryRegistryW (HKEY hMainKey, const wchar_t *pszKey, const | ||
492 | wchar_t *pszSubKey, | ||
493 | wchar_t *pszBuffer, long *pdLength); | ||
494 | |||
495 | BOOL __win_IsHandleMarkedAsBlocking (int hHandle); | ||
496 | |||
497 | void __win_SetHandleBlockingMode (int s, BOOL bBlocking); | ||
498 | |||
499 | void __win_DiscardHandleBlockingMode (int s); | ||
500 | |||
501 | int _win_isSocketValid (int s); | ||
470 | 502 | ||
471 | BOOL _plibc_CreateShortcut(const char *pszSrc, const char *pszDest); | 503 | int plibc_conv_to_win_path (const char *pszUnix, char *pszWindows); |
472 | BOOL _plibc_CreateShortcutW(const wchar_t *pwszSrc, const wchar_t *pwszDest); | ||
473 | BOOL _plibc_DereferenceShortcut(char *pszShortcut); | ||
474 | BOOL _plibc_DereferenceShortcutW(wchar_t *pwszShortcut); | ||
475 | char *plibc_ChooseDir(char *pszTitle, unsigned long ulFlags); | ||
476 | wchar_t *plibc_ChooseDirW(wchar_t *pwszTitle, unsigned long ulFlags); | ||
477 | char *plibc_ChooseFile(char *pszTitle, unsigned long ulFlags); | ||
478 | wchar_t *plibc_ChooseFileW(wchar_t *pwszTitle, unsigned long ulFlags); | ||
479 | 504 | ||
480 | long QueryRegistry(HKEY hMainKey, const char *pszKey, const char *pszSubKey, | 505 | int plibc_conv_to_win_pathw (const wchar_t *pszUnix, wchar_t *pwszWindows); |
481 | char *pszBuffer, long *pdLength); | ||
482 | long QueryRegistryW(HKEY hMainKey, const wchar_t *pszKey, const wchar_t *pszSubKey, | ||
483 | wchar_t *pszBuffer, long *pdLength); | ||
484 | 506 | ||
485 | BOOL __win_IsHandleMarkedAsBlocking(int hHandle); | 507 | int plibc_conv_to_win_pathwconv (const char *pszUnix, wchar_t *pwszWindows); |
486 | void __win_SetHandleBlockingMode(int s, BOOL bBlocking); | ||
487 | void __win_DiscardHandleBlockingMode(int s); | ||
488 | int _win_isSocketValid(int s); | ||
489 | int plibc_conv_to_win_path(const char *pszUnix, char *pszWindows); | ||
490 | int plibc_conv_to_win_pathw(const wchar_t *pszUnix, wchar_t *pwszWindows); | ||
491 | 508 | ||
492 | int plibc_conv_to_win_pathwconv(const char *pszUnix, wchar_t *pwszWindows); | 509 | int plibc_conv_to_win_pathwconv_ex (const char *pszUnix, wchar_t *pszWindows, |
493 | int plibc_conv_to_win_pathwconv_ex(const char *pszUnix, wchar_t *pszWindows, int derefLinks); | 510 | int derefLinks); |
494 | 511 | ||
495 | unsigned plibc_get_handle_count(); | 512 | unsigned plibc_get_handle_count (); |
496 | 513 | ||
497 | typedef void (*TPanicProc) (int, char *); | 514 | typedef void (*TPanicProc) (int, char *); |
498 | void plibc_set_panic_proc(TPanicProc proc); | 515 | void plibc_set_panic_proc (TPanicProc proc); |
499 | void plibc_set_stat_size_size(int iLength); | 516 | |
500 | void plibc_set_stat_time_size(int iLength); | 517 | void plibc_set_stat_size_size (int iLength); |
501 | 518 | ||
502 | int flock(int fd, int operation); | 519 | void plibc_set_stat_time_size (int iLength); |
503 | int fsync(int fildes); | 520 | |
504 | int inet_pton(int af, const char *src, void *dst); | 521 | int flock (int fd, int operation); |
505 | int inet_pton4(const char *src, u_char *dst, int pton); | 522 | |
523 | int fsync (int fildes); | ||
524 | |||
525 | int inet_pton (int af, const char *src, void *dst); | ||
526 | |||
527 | int inet_pton4 (const char *src, u_char *dst, int pton); | ||
528 | |||
506 | #if USE_IPV6 | 529 | #if USE_IPV6 |
507 | int inet_pton6(const char *src, u_char *dst); | 530 | int inet_pton6 (const char *src, u_char *dst); |
531 | |||
508 | #endif | 532 | #endif |
509 | int statfs(const char *path, struct statfs *buf); | 533 | int statfs (const char *path, struct statfs *buf); |
510 | const char *hstrerror(int err); | 534 | |
511 | int mkstemp(char *tmplate); | 535 | const char *hstrerror (int err); |
536 | |||
537 | int mkstemp (char *tmplate); | ||
538 | |||
512 | char *strptime (const char *buf, const char *format, struct tm *tm); | 539 | char *strptime (const char *buf, const char *format, struct tm *tm); |
513 | const char *inet_ntop(int af, const void *src, char *dst, size_t size); | 540 | |
541 | const char *inet_ntop (int af, const void *src, char *dst, size_t size); | ||
542 | |||
514 | #ifndef gmtime_r | 543 | #ifndef gmtime_r |
515 | struct tm *gmtime_r(const time_t *clock, struct tm *result); | 544 | struct tm *gmtime_r (const time_t *clock, struct tm *result); |
516 | #endif | 545 | |
517 | 546 | #endif | |
518 | int plibc_init(char *pszOrg, char *pszApp); | 547 | |
519 | int plibc_init_utf8(char *pszOrg, char *pszApp, int utf8_mode); | 548 | int plibc_init (char *pszOrg, char *pszApp); |
520 | void plibc_shutdown(); | 549 | |
521 | int plibc_initialized(); | 550 | int plibc_init_utf8 (char *pszOrg, char *pszApp, int utf8_mode); |
522 | 551 | ||
523 | void _SetErrnoFromWinError(long lWinError, char *pszCaller, int iLine); | 552 | void plibc_shutdown (); |
524 | void SetErrnoFromWinsockError(long lWinError); | 553 | |
525 | void SetHErrnoFromWinError(long lWinError); | 554 | int plibc_initialized (); |
526 | void SetErrnoFromHRESULT(HRESULT hRes); | 555 | |
527 | int GetErrnoFromWinsockError(long lWinError); | 556 | void _SetErrnoFromWinError (long lWinError, char *pszCaller, int iLine); |
528 | FILE *_win_fopen(const char *filename, const char *mode); | 557 | |
529 | int _win_fclose(FILE *); | 558 | void SetErrnoFromWinsockError (long lWinError); |
530 | DIR *_win_opendir(const char *dirname); | 559 | |
531 | struct dirent *_win_readdir(DIR *dirp); | 560 | void SetHErrnoFromWinError (long lWinError); |
532 | int _win_closedir(DIR *dirp); | 561 | |
533 | int _win_open(const char *filename, int oflag, ...); | 562 | void SetErrnoFromHRESULT (HRESULT hRes); |
563 | |||
564 | int GetErrnoFromWinsockError (long lWinError); | ||
565 | |||
566 | FILE *_win_fopen (const char *filename, const char *mode); | ||
567 | |||
568 | int _win_fclose (FILE *); | ||
569 | |||
570 | DIR *_win_opendir (const char *dirname); | ||
571 | |||
572 | struct dirent *_win_readdir (DIR *dirp); | ||
573 | |||
574 | int _win_closedir (DIR *dirp); | ||
575 | |||
576 | int _win_open (const char *filename, int oflag, ...); | ||
577 | |||
534 | #ifdef ENABLE_NLS | 578 | #ifdef ENABLE_NLS |
535 | char *_win_bindtextdomain(const char *domainname, const char *dirname); | 579 | char *_win_bindtextdomain (const char *domainname, const char *dirname); |
536 | #endif | 580 | |
537 | int _win_chdir(const char *path); | 581 | #endif |
538 | int _win_close(int fd); | 582 | int _win_chdir (const char *path); |
539 | int _win_creat(const char *path, mode_t mode); | 583 | |
540 | char *_win_ctime(const time_t *clock); | 584 | int _win_close (int fd); |
541 | char *_win_ctime_r(const time_t *clock, char *buf); | 585 | |
542 | int _win_fstat(int handle, struct stat *buffer); | 586 | int _win_creat (const char *path, mode_t mode); |
543 | int _win_ftruncate(int fildes, off_t length); | 587 | |
544 | int _win_truncate(const char *fname, int distance); | 588 | char *_win_ctime (const time_t *clock); |
545 | int _win_kill(pid_t pid, int sig); | 589 | |
546 | int _win_pipe(int *phandles); | 590 | char *_win_ctime_r (const time_t *clock, char *buf); |
547 | int _win_mkfifo(const char *path, mode_t mode); | 591 | |
548 | int _win_rmdir(const char *path); | 592 | int _win_fstat (int handle, struct stat *buffer); |
549 | int _win_access( const char *path, int mode ); | 593 | |
550 | int _win_chmod(const char *filename, int pmode); | 594 | int _win_ftruncate (int fildes, off_t length); |
551 | char *realpath(const char *file_name, char *resolved_name); | 595 | |
552 | long _win_random(void); | 596 | int _win_truncate (const char *fname, int distance); |
553 | void _win_srandom(unsigned int seed); | 597 | |
554 | int _win_remove(const char *path); | 598 | int _win_kill (pid_t pid, int sig); |
555 | int _win_rename(const char *oldname, const char *newname); | 599 | |
556 | int _win_stat(const char *path, struct stat *buffer); | 600 | int _win_pipe (int *phandles); |
557 | int _win_stati64(const char *path, struct _stati64 *buffer); | 601 | |
558 | long _win_sysconf(int name); | 602 | int _win_mkfifo (const char *path, mode_t mode); |
559 | int _win_unlink(const char *filename); | 603 | |
560 | int _win_write(int fildes, const void *buf, size_t nbyte); | 604 | int _win_rmdir (const char *path); |
561 | int _win_read(int fildes, void *buf, size_t nbyte); | 605 | |
562 | size_t _win_fwrite(const void *buffer, size_t size, size_t count, FILE *stream); | 606 | int _win_access (const char *path, int mode); |
563 | size_t _win_fread( void *buffer, size_t size, size_t count, FILE *stream ); | 607 | |
564 | int _win_symlink(const char *path1, const char *path2); | 608 | int _win_chmod (const char *filename, int pmode); |
565 | void *_win_mmap(void *start, size_t len, int access, int flags, int fd, | 609 | |
566 | unsigned long long offset); | 610 | char *realpath (const char *file_name, char *resolved_name); |
567 | int _win_msync(void *start, size_t length, int flags); | 611 | |
568 | int _win_munmap(void *start, size_t length); | 612 | long _win_random (void); |
569 | int _win_lstat(const char *path, struct stat *buf); | 613 | |
570 | int _win_lstati64(const char *path, struct _stati64 *buf); | 614 | void _win_srandom (unsigned int seed); |
571 | int _win_readlink(const char *path, char *buf, size_t bufsize); | 615 | |
572 | int _win_accept(int s, struct sockaddr *addr, int *addrlen); | 616 | int _win_remove (const char *path); |
573 | 617 | ||
574 | pid_t _win_waitpid(pid_t pid, int *stat_loc, int options); | 618 | int _win_rename (const char *oldname, const char *newname); |
575 | int _win_bind(int s, const struct sockaddr *name, int namelen); | 619 | |
576 | int _win_connect(int s,const struct sockaddr *name, int namelen); | 620 | int _win_stat (const char *path, struct stat *buffer); |
577 | int _win_getpeername(int s, struct sockaddr *name, | 621 | |
578 | int *namelen); | 622 | int _win_stati64 (const char *path, struct _stati64 *buffer); |
579 | int _win_getsockname(int s, struct sockaddr *name, | 623 | |
580 | int *namelen); | 624 | long _win_sysconf (int name); |
581 | int _win_getsockopt(int s, int level, int optname, char *optval, | 625 | |
582 | int *optlen); | 626 | int _win_unlink (const char *filename); |
583 | int _win_listen(int s, int backlog); | 627 | |
584 | int _win_recv(int s, char *buf, int len, int flags); | 628 | int _win_write (int fildes, const void *buf, size_t nbyte); |
585 | int _win_recvfrom(int s, void *buf, int len, int flags, | 629 | |
586 | struct sockaddr *from, int *fromlen); | 630 | int _win_read (int fildes, void *buf, size_t nbyte); |
587 | int _win_select(int max_fd, fd_set * rfds, fd_set * wfds, fd_set * efds, | 631 | |
588 | const struct timeval *tv); | 632 | size_t _win_fwrite (const void *buffer, size_t size, size_t count, |
589 | int _win_send(int s, const char *buf, int len, int flags); | 633 | FILE *stream); |
590 | int _win_sendto(int s, const char *buf, int len, int flags, | 634 | |
591 | const struct sockaddr *to, int tolen); | 635 | size_t _win_fread (void *buffer, size_t size, size_t count, FILE *stream); |
592 | int _win_setsockopt(int s, int level, int optname, const void *optval, | 636 | |
593 | int optlen); | 637 | int _win_symlink (const char *path1, const char *path2); |
594 | int _win_shutdown(int s, int how); | 638 | |
595 | int _win_socket(int af, int type, int protocol); | 639 | void *_win_mmap (void *start, size_t len, int access, int flags, int fd, |
596 | int _win_socketpair(int af, int type, int protocol, int socket_vector[2]); | 640 | unsigned long long offset); |
597 | struct hostent *_win_gethostbyaddr(const char *addr, int len, int type); | 641 | |
598 | struct hostent *_win_gethostbyname(const char *name); | 642 | int _win_msync (void *start, size_t length, int flags); |
599 | struct hostent *gethostbyname2(const char *name, int af); | 643 | |
600 | char *_win_strerror(int errnum); | 644 | int _win_munmap (void *start, size_t length); |
601 | int IsWinNT(); | 645 | |
602 | char *index(const char *s, int c); | 646 | int _win_lstat (const char *path, struct stat *buf); |
647 | |||
648 | int _win_lstati64 (const char *path, struct _stati64 *buf); | ||
649 | |||
650 | int _win_readlink (const char *path, char *buf, size_t bufsize); | ||
651 | |||
652 | int _win_accept (int s, struct sockaddr *addr, int *addrlen); | ||
653 | |||
654 | pid_t _win_waitpid (pid_t pid, int *stat_loc, int options); | ||
655 | |||
656 | int _win_bind (int s, const struct sockaddr *name, int namelen); | ||
657 | |||
658 | int _win_connect (int s,const struct sockaddr *name, int namelen); | ||
659 | |||
660 | int _win_getpeername (int s, struct sockaddr *name, | ||
661 | int *namelen); | ||
662 | |||
663 | int _win_getsockname (int s, struct sockaddr *name, | ||
664 | int *namelen); | ||
665 | |||
666 | int _win_getsockopt (int s, int level, int optname, char *optval, | ||
667 | int *optlen); | ||
668 | |||
669 | int _win_listen (int s, int backlog); | ||
670 | |||
671 | int _win_recv (int s, char *buf, int len, int flags); | ||
672 | |||
673 | int _win_recvfrom (int s, void *buf, int len, int flags, | ||
674 | struct sockaddr *from, int *fromlen); | ||
675 | |||
676 | int _win_select (int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, | ||
677 | const struct timeval *tv); | ||
678 | |||
679 | int _win_send (int s, const char *buf, int len, int flags); | ||
680 | |||
681 | int _win_sendto (int s, const char *buf, int len, int flags, | ||
682 | const struct sockaddr *to, int tolen); | ||
683 | |||
684 | int _win_setsockopt (int s, int level, int optname, const void *optval, | ||
685 | int optlen); | ||
686 | |||
687 | int _win_shutdown (int s, int how); | ||
688 | |||
689 | int _win_socket (int af, int type, int protocol); | ||
690 | |||
691 | int _win_socketpair (int af, int type, int protocol, int socket_vector[2]); | ||
692 | |||
693 | struct hostent *_win_gethostbyaddr (const char *addr, int len, int type); | ||
694 | |||
695 | struct hostent *_win_gethostbyname (const char *name); | ||
696 | |||
697 | struct hostent *gethostbyname2 (const char *name, int af); | ||
698 | |||
699 | char *_win_strerror (int errnum); | ||
700 | |||
701 | int IsWinNT (); | ||
702 | |||
703 | char *index (const char *s, int c); | ||
704 | |||
603 | char *_win_strtok_r (char *ptr, const char *sep, char **end); | 705 | char *_win_strtok_r (char *ptr, const char *sep, char **end); |
604 | 706 | ||
605 | #if !HAVE_STRNDUP | 707 | #if ! HAVE_STRNDUP |
606 | char *strndup (const char *s, size_t n); | 708 | char *strndup (const char *s, size_t n); |
709 | |||
607 | #endif | 710 | #endif |
608 | #if !HAVE_STRNLEN && (!defined(__MINGW64_VERSION_MAJOR) || !defined(_INC_STRING)) | 711 | #if ! HAVE_STRNLEN && (! defined(__MINGW64_VERSION_MAJOR) || \ |
712 | ! defined(_INC_STRING)) | ||
609 | size_t strnlen (const char *str, size_t maxlen); | 713 | size_t strnlen (const char *str, size_t maxlen); |
714 | |||
610 | #endif | 715 | #endif |
611 | char *stpcpy(char *dest, const char *src); | 716 | char *stpcpy (char *dest, const char *src); |
612 | char *strcasestr(const char *haystack_start, const char *needle_start); | 717 | |
718 | char *strcasestr (const char *haystack_start, const char *needle_start); | ||
719 | |||
613 | #ifndef __MINGW64_VERSION_MAJOR | 720 | #ifndef __MINGW64_VERSION_MAJOR |
614 | #define strcasecmp(a, b) stricmp(a, b) | 721 | #define strcasecmp(a, b) stricmp (a, b) |
615 | #define strncasecmp(a, b, c) strnicmp(a, b, c) | 722 | #define strncasecmp(a, b, c) strnicmp (a, b, c) |
616 | #endif | 723 | #endif |
617 | #ifndef wcscasecmp | 724 | #ifndef wcscasecmp |
618 | #define wcscasecmp(a, b) wcsicmp(a, b) | 725 | #define wcscasecmp(a, b) wcsicmp (a, b) |
619 | #endif | 726 | #endif |
620 | #ifndef wcsncasecmp | 727 | #ifndef wcsncasecmp |
621 | #define wcsncasecmp(a, b, c) wcsnicmp(a, b, c) | 728 | #define wcsncasecmp(a, b, c) wcsnicmp (a, b, c) |
622 | #endif | 729 | #endif |
623 | #ifndef strtok_r /* winpthreads defines it in pthread.h */ | 730 | #ifndef strtok_r /* winpthreads defines it in pthread.h */ |
624 | #define strtok_r _win_strtok_r | 731 | #define strtok_r _win_strtok_r |
@@ -633,99 +740,99 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
633 | #define NEWLINE "\n" | 740 | #define NEWLINE "\n" |
634 | 741 | ||
635 | #ifdef ENABLE_NLS | 742 | #ifdef ENABLE_NLS |
636 | #define BINDTEXTDOMAIN(d, n) bindtextdomain(d, n) | 743 | #define BINDTEXTDOMAIN(d, n) bindtextdomain (d, n) |
637 | #endif | 744 | #endif |
638 | #define CREAT(p, m) creat(p, m) | 745 | #define CREAT(p, m) creat (p, m) |
639 | #define PLIBC_CTIME(c) ctime(c) | 746 | #define PLIBC_CTIME(c) ctime (c) |
640 | #define CTIME_R(c, b) ctime_r(c, b) | 747 | #define CTIME_R(c, b) ctime_r (c, b) |
641 | #undef FOPEN | 748 | #undef FOPEN |
642 | #define FOPEN(f, m) fopen(f, m) | 749 | #define FOPEN(f, m) fopen (f, m) |
643 | #define FCLOSE(f) fclose(f) | 750 | #define FCLOSE(f) fclose (f) |
644 | #define FTRUNCATE(f, l) ftruncate(f, l) | 751 | #define FTRUNCATE(f, l) ftruncate (f, l) |
645 | #define TRUNCATE(f, l) truncate(f, l) | 752 | #define TRUNCATE(f, l) truncate (f, l) |
646 | #define OPENDIR(d) opendir(d) | 753 | #define OPENDIR(d) opendir (d) |
647 | #define CLOSEDIR(d) closedir(d) | 754 | #define CLOSEDIR(d) closedir (d) |
648 | #define READDIR(d) readdir(d) | 755 | #define READDIR(d) readdir (d) |
649 | #define OPEN open | 756 | #define OPEN open |
650 | #define CHDIR(d) chdir(d) | 757 | #define CHDIR(d) chdir (d) |
651 | #define CLOSE(f) close(f) | 758 | #define CLOSE(f) close (f) |
652 | #define LSEEK(f, o, w) lseek(f, o, w) | 759 | #define LSEEK(f, o, w) lseek (f, o, w) |
653 | #define RMDIR(f) rmdir(f) | 760 | #define RMDIR(f) rmdir (f) |
654 | #define ACCESS(p, m) access(p, m) | 761 | #define ACCESS(p, m) access (p, m) |
655 | #define CHMOD(f, p) chmod(f, p) | 762 | #define CHMOD(f, p) chmod (f, p) |
656 | #define FSTAT(h, b) fstat(h, b) | 763 | #define FSTAT(h, b) fstat (h, b) |
657 | #define PLIBC_KILL(p, s) kill(p, s) | 764 | #define PLIBC_KILL(p, s) kill (p, s) |
658 | #define PIPE(h) pipe(h) | 765 | #define PIPE(h) pipe (h) |
659 | #define REMOVE(p) remove(p) | 766 | #define REMOVE(p) remove (p) |
660 | #define RENAME(o, n) rename(o, n) | 767 | #define RENAME(o, n) rename (o, n) |
661 | #define STAT(p, b) stat(p, b) | 768 | #define STAT(p, b) stat (p, b) |
662 | #define STAT64(p, b) stat64(p, b) | 769 | #define STAT64(p, b) stat64 (p, b) |
663 | #define SYSCONF(n) sysconf(n) | 770 | #define SYSCONF(n) sysconf (n) |
664 | #define UNLINK(f) unlink(f) | 771 | #define UNLINK(f) unlink (f) |
665 | #define WRITE(f, b, n) write(f, b, n) | 772 | #define WRITE(f, b, n) write (f, b, n) |
666 | #define READ(f, b, n) read(f, b, n) | 773 | #define READ(f, b, n) read (f, b, n) |
667 | #define GN_FREAD(b, s, c, f) fread(b, s, c, f) | 774 | #define GN_FREAD(b, s, c, f) fread (b, s, c, f) |
668 | #define GN_FWRITE(b, s, c, f) fwrite(b, s, c, f) | 775 | #define GN_FWRITE(b, s, c, f) fwrite (b, s, c, f) |
669 | #define SYMLINK(a, b) symlink(a, b) | 776 | #define SYMLINK(a, b) symlink (a, b) |
670 | #define MMAP(s, l, p, f, d, o) mmap(s, l, p, f, d, o) | 777 | #define MMAP(s, l, p, f, d, o) mmap (s, l, p, f, d, o) |
671 | #define MKFIFO(p, m) mkfifo(p, m) | 778 | #define MKFIFO(p, m) mkfifo (p, m) |
672 | #define MSYNC(s, l, f) msync(s, l, f) | 779 | #define MSYNC(s, l, f) msync (s, l, f) |
673 | #define MUNMAP(s, l) munmap(s, l) | 780 | #define MUNMAP(s, l) munmap (s, l) |
674 | #define STRERROR(i) strerror(i) | 781 | #define STRERROR(i) strerror (i) |
675 | #define RANDOM() random() | 782 | #define RANDOM() random () |
676 | #define SRANDOM(s) srandom(s) | 783 | #define SRANDOM(s) srandom (s) |
677 | #define READLINK(p, b, s) readlink(p, b, s) | 784 | #define READLINK(p, b, s) readlink (p, b, s) |
678 | #define LSTAT(p, b) lstat(p, b) | 785 | #define LSTAT(p, b) lstat (p, b) |
679 | #define LSTAT64(p, b) lstat64(p, b) | 786 | #define LSTAT64(p, b) lstat64 (p, b) |
680 | #define PRINTF printf | 787 | #define PRINTF printf |
681 | #define FPRINTF fprintf | 788 | #define FPRINTF fprintf |
682 | #define VPRINTF(f, a) vprintf(f, a) | 789 | #define VPRINTF(f, a) vprintf (f, a) |
683 | #define VFPRINTF(s, f, a) vfprintf(s, f, a) | 790 | #define VFPRINTF(s, f, a) vfprintf (s, f, a) |
684 | #define VSPRINTF(d, f, a) vsprintf(d, f, a) | 791 | #define VSPRINTF(d, f, a) vsprintf (d, f, a) |
685 | #define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a) | 792 | #define VSNPRINTF(str, size, fmt, a) vsnprintf (str, size, fmt, a) |
686 | #define _REAL_SNPRINTF snprintf | 793 | #define _REAL_SNPRINTF snprintf |
687 | #define SPRINTF sprintf | 794 | #define SPRINTF sprintf |
688 | #define VSSCANF(s, f, a) vsscanf(s, f, a) | 795 | #define VSSCANF(s, f, a) vsscanf (s, f, a) |
689 | #define SSCANF sscanf | 796 | #define SSCANF sscanf |
690 | #define VFSCANF(s, f, a) vfscanf(s, f, a) | 797 | #define VFSCANF(s, f, a) vfscanf (s, f, a) |
691 | #define VSCANF(f, a) vscanf(f, a) | 798 | #define VSCANF(f, a) vscanf (f, a) |
692 | #define SCANF scanf | 799 | #define SCANF scanf |
693 | #define FSCANF fscanf | 800 | #define FSCANF fscanf |
694 | #define WAITPID(p, s, o) waitpid(p, s, o) | 801 | #define WAITPID(p, s, o) waitpid (p, s, o) |
695 | #define ACCEPT(s, a, l) accept(s, a, l) | 802 | #define ACCEPT(s, a, l) accept (s, a, l) |
696 | #define BIND(s, n, l) bind(s, n, l) | 803 | #define BIND(s, n, l) bind (s, n, l) |
697 | #define CONNECT(s, n, l) connect(s, n, l) | 804 | #define CONNECT(s, n, l) connect (s, n, l) |
698 | #define GETPEERNAME(s, n, l) getpeername(s, n, l) | 805 | #define GETPEERNAME(s, n, l) getpeername (s, n, l) |
699 | #define GETSOCKNAME(s, n, l) getsockname(s, n, l) | 806 | #define GETSOCKNAME(s, n, l) getsockname (s, n, l) |
700 | #define GETSOCKOPT(s, l, o, v, p) getsockopt(s, l, o, v, p) | 807 | #define GETSOCKOPT(s, l, o, v, p) getsockopt (s, l, o, v, p) |
701 | #define LISTEN(s, b) listen(s, b) | 808 | #define LISTEN(s, b) listen (s, b) |
702 | #define RECV(s, b, l, f) recv(s, b, l, f) | 809 | #define RECV(s, b, l, f) recv (s, b, l, f) |
703 | #define RECVFROM(s, b, l, f, r, o) recvfrom(s, b, l, f, r, o) | 810 | #define RECVFROM(s, b, l, f, r, o) recvfrom (s, b, l, f, r, o) |
704 | #define SELECT(n, r, w, e, t) select(n, r, w, e, t) | 811 | #define SELECT(n, r, w, e, t) select (n, r, w, e, t) |
705 | #define SEND(s, b, l, f) send(s, b, l, f) | 812 | #define SEND(s, b, l, f) send (s, b, l, f) |
706 | #define SENDTO(s, b, l, f, o, n) sendto(s, b, l, f, o, n) | 813 | #define SENDTO(s, b, l, f, o, n) sendto (s, b, l, f, o, n) |
707 | #define SETSOCKOPT(s, l, o, v, n) setsockopt(s, l, o, v, n) | 814 | #define SETSOCKOPT(s, l, o, v, n) setsockopt (s, l, o, v, n) |
708 | #define SHUTDOWN(s, h) shutdown(s, h) | 815 | #define SHUTDOWN(s, h) shutdown (s, h) |
709 | #define SOCKET(a, t, p) socket(a, t, p) | 816 | #define SOCKET(a, t, p) socket (a, t, p) |
710 | #define SOCKETPAIR(a, t, p, v) socketpair(a, t, p, v) | 817 | #define SOCKETPAIR(a, t, p, v) socketpair (a, t, p, v) |
711 | #define GETHOSTBYADDR(a, l, t) gethostbyaddr(a, l, t) | 818 | #define GETHOSTBYADDR(a, l, t) gethostbyaddr (a, l, t) |
712 | #define GETHOSTBYNAME(n) gethostbyname(n) | 819 | #define GETHOSTBYNAME(n) gethostbyname (n) |
713 | #define GETTIMEOFDAY(t, n) gettimeofday(t, n) | 820 | #define GETTIMEOFDAY(t, n) gettimeofday (t, n) |
714 | #define INSQUE(e, p) insque(e, p) | 821 | #define INSQUE(e, p) insque (e, p) |
715 | #define REMQUE(e) remque(e) | 822 | #define REMQUE(e) remque (e) |
716 | #define HSEARCH(i, a) hsearch(i, a) | 823 | #define HSEARCH(i, a) hsearch (i, a) |
717 | #define HCREATE(n) hcreate(n) | 824 | #define HCREATE(n) hcreate (n) |
718 | #define HDESTROY() hdestroy() | 825 | #define HDESTROY() hdestroy () |
719 | #define HSEARCH_R(i, a, r, h) hsearch_r(i, a, r, h) | 826 | #define HSEARCH_R(i, a, r, h) hsearch_r (i, a, r, h) |
720 | #define HCREATE_R(n, h) hcreate_r(n, h) | 827 | #define HCREATE_R(n, h) hcreate_r (n, h) |
721 | #define HDESTROY_R(h) hdestroy_r(h) | 828 | #define HDESTROY_R(h) hdestroy_r (h) |
722 | #define TSEARCH(k, r, c) tsearch(k, r, c) | 829 | #define TSEARCH(k, r, c) tsearch (k, r, c) |
723 | #define TFIND(k, r, c) tfind(k, r, c) | 830 | #define TFIND(k, r, c) tfind (k, r, c) |
724 | #define TDELETE(k, r, c) tdelete(k, r, c) | 831 | #define TDELETE(k, r, c) tdelete (k, r, c) |
725 | #define TWALK(r, a) twalk(r, a) | 832 | #define TWALK(r, a) twalk (r, a) |
726 | #define TDESTROY(r, f) tdestroy(r, f) | 833 | #define TDESTROY(r, f) tdestroy (r, f) |
727 | #define LFIND(k, b, n, s, c) lfind(k, b, n, s, c) | 834 | #define LFIND(k, b, n, s, c) lfind (k, b, n, s, c) |
728 | #define LSEARCH(k, b, n, s, c) lsearch(k, b, n, s, c) | 835 | #define LSEARCH(k, b, n, s, c) lsearch (k, b, n, s, c) |
729 | #define STRUCT_STAT64 struct stat64 | 836 | #define STRUCT_STAT64 struct stat64 |
730 | #else | 837 | #else |
731 | #define DIR_SEPARATOR '\\' | 838 | #define DIR_SEPARATOR '\\' |
@@ -735,98 +842,98 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
735 | #define NEWLINE "\r\n" | 842 | #define NEWLINE "\r\n" |
736 | 843 | ||
737 | #ifdef ENABLE_NLS | 844 | #ifdef ENABLE_NLS |
738 | #define BINDTEXTDOMAIN(d, n) _win_bindtextdomain(d, n) | 845 | #define BINDTEXTDOMAIN(d, n) _win_bindtextdomain (d, n) |
739 | #endif | 846 | #endif |
740 | #define CREAT(p, m) _win_creat(p, m) | 847 | #define CREAT(p, m) _win_creat (p, m) |
741 | #define PLIBC_CTIME(c) _win_ctime(c) | 848 | #define PLIBC_CTIME(c) _win_ctime (c) |
742 | #define CTIME_R(c, b) _win_ctime_r(c, b) | 849 | #define CTIME_R(c, b) _win_ctime_r (c, b) |
743 | #define FOPEN(f, m) _win_fopen(f, m) | 850 | #define FOPEN(f, m) _win_fopen (f, m) |
744 | #define FCLOSE(f) _win_fclose(f) | 851 | #define FCLOSE(f) _win_fclose (f) |
745 | #define FTRUNCATE(f, l) _win_ftruncate(f, l) | 852 | #define FTRUNCATE(f, l) _win_ftruncate (f, l) |
746 | #define TRUNCATE(f, l) _win_truncate(f, l) | 853 | #define TRUNCATE(f, l) _win_truncate (f, l) |
747 | #define OPENDIR(d) _win_opendir(d) | 854 | #define OPENDIR(d) _win_opendir (d) |
748 | #define CLOSEDIR(d) _win_closedir(d) | 855 | #define CLOSEDIR(d) _win_closedir (d) |
749 | #define READDIR(d) _win_readdir(d) | 856 | #define READDIR(d) _win_readdir (d) |
750 | #define OPEN _win_open | 857 | #define OPEN _win_open |
751 | #define CHDIR(d) _win_chdir(d) | 858 | #define CHDIR(d) _win_chdir (d) |
752 | #define CLOSE(f) _win_close(f) | 859 | #define CLOSE(f) _win_close (f) |
753 | #define PLIBC_KILL(p, s) _win_kill(p, s) | 860 | #define PLIBC_KILL(p, s) _win_kill (p, s) |
754 | #define LSEEK(f, o, w) lseek(f, o, w) | 861 | #define LSEEK(f, o, w) lseek (f, o, w) |
755 | #define FSTAT(h, b) _win_fstat(h, b) | 862 | #define FSTAT(h, b) _win_fstat (h, b) |
756 | #define RMDIR(f) _win_rmdir(f) | 863 | #define RMDIR(f) _win_rmdir (f) |
757 | #define ACCESS(p, m) _win_access(p, m) | 864 | #define ACCESS(p, m) _win_access (p, m) |
758 | #define CHMOD(f, p) _win_chmod(f, p) | 865 | #define CHMOD(f, p) _win_chmod (f, p) |
759 | #define PIPE(h) _win_pipe(h) | 866 | #define PIPE(h) _win_pipe (h) |
760 | #define RANDOM() _win_random() | 867 | #define RANDOM() _win_random () |
761 | #define SRANDOM(s) _win_srandom(s) | 868 | #define SRANDOM(s) _win_srandom (s) |
762 | #define REMOVE(p) _win_remove(p) | 869 | #define REMOVE(p) _win_remove (p) |
763 | #define RENAME(o, n) _win_rename(o, n) | 870 | #define RENAME(o, n) _win_rename (o, n) |
764 | #define STAT(p, b) _win_stat(p, b) | 871 | #define STAT(p, b) _win_stat (p, b) |
765 | #define STAT64(p, b) _win_stati64(p, b) | 872 | #define STAT64(p, b) _win_stati64 (p, b) |
766 | #define SYSCONF(n) _win_sysconf(n) | 873 | #define SYSCONF(n) _win_sysconf (n) |
767 | #define UNLINK(f) _win_unlink(f) | 874 | #define UNLINK(f) _win_unlink (f) |
768 | #define WRITE(f, b, n) _win_write(f, b, n) | 875 | #define WRITE(f, b, n) _win_write (f, b, n) |
769 | #define READ(f, b, n) _win_read(f, b, n) | 876 | #define READ(f, b, n) _win_read (f, b, n) |
770 | #define GN_FREAD(b, s, c, f) _win_fread(b, s, c, f) | 877 | #define GN_FREAD(b, s, c, f) _win_fread (b, s, c, f) |
771 | #define GN_FWRITE(b, s, c, f) _win_fwrite(b, s, c, f) | 878 | #define GN_FWRITE(b, s, c, f) _win_fwrite (b, s, c, f) |
772 | #define SYMLINK(a, b) _win_symlink(a, b) | 879 | #define SYMLINK(a, b) _win_symlink (a, b) |
773 | #define MMAP(s, l, p, f, d, o) _win_mmap(s, l, p, f, d, o) | 880 | #define MMAP(s, l, p, f, d, o) _win_mmap (s, l, p, f, d, o) |
774 | #define MKFIFO(p, m) _win_mkfifo(p, m) | 881 | #define MKFIFO(p, m) _win_mkfifo (p, m) |
775 | #define MSYNC(s, l, f) _win_msync(s, l, f) | 882 | #define MSYNC(s, l, f) _win_msync (s, l, f) |
776 | #define MUNMAP(s, l) _win_munmap(s, l) | 883 | #define MUNMAP(s, l) _win_munmap (s, l) |
777 | #define STRERROR(i) _win_strerror(i) | 884 | #define STRERROR(i) _win_strerror (i) |
778 | #define READLINK(p, b, s) _win_readlink(p, b, s) | 885 | #define READLINK(p, b, s) _win_readlink (p, b, s) |
779 | #define LSTAT(p, b) _win_lstat(p, b) | 886 | #define LSTAT(p, b) _win_lstat (p, b) |
780 | #define LSTAT64(p, b) _win_lstati64(p, b) | 887 | #define LSTAT64(p, b) _win_lstati64 (p, b) |
781 | #define PRINTF printf | 888 | #define PRINTF printf |
782 | #define FPRINTF fprintf | 889 | #define FPRINTF fprintf |
783 | #define VPRINTF(f, a) vprintf(f, a) | 890 | #define VPRINTF(f, a) vprintf (f, a) |
784 | #define VFPRINTF(s, f, a) vfprintf(s, f, a) | 891 | #define VFPRINTF(s, f, a) vfprintf (s, f, a) |
785 | #define VSPRINTF(d, f, a) vsprintf(d, f, a) | 892 | #define VSPRINTF(d, f, a) vsprintf (d, f, a) |
786 | #define VSNPRINTF(str, size, fmt, a) vsnprintf(str, size, fmt, a) | 893 | #define VSNPRINTF(str, size, fmt, a) vsnprintf (str, size, fmt, a) |
787 | #define _REAL_SNPRINTF snprintf | 894 | #define _REAL_SNPRINTF snprintf |
788 | #define SPRINTF sprintf | 895 | #define SPRINTF sprintf |
789 | #define VSSCANF(s, f, a) vsscanf(s, f, a) | 896 | #define VSSCANF(s, f, a) vsscanf (s, f, a) |
790 | #define SSCANF sscanf | 897 | #define SSCANF sscanf |
791 | #define VFSCANF(s, f, a) vfscanf(s, f, a) | 898 | #define VFSCANF(s, f, a) vfscanf (s, f, a) |
792 | #define VSCANF(f, a) vscanf(f, a) | 899 | #define VSCANF(f, a) vscanf (f, a) |
793 | #define SCANF scanf | 900 | #define SCANF scanf |
794 | #define FSCANF fscanf | 901 | #define FSCANF fscanf |
795 | #define WAITPID(p, s, o) _win_waitpid(p, s, o) | 902 | #define WAITPID(p, s, o) _win_waitpid (p, s, o) |
796 | #define ACCEPT(s, a, l) _win_accept(s, a, l) | 903 | #define ACCEPT(s, a, l) _win_accept (s, a, l) |
797 | #define BIND(s, n, l) _win_bind(s, n, l) | 904 | #define BIND(s, n, l) _win_bind (s, n, l) |
798 | #define CONNECT(s, n, l) _win_connect(s, n, l) | 905 | #define CONNECT(s, n, l) _win_connect (s, n, l) |
799 | #define GETPEERNAME(s, n, l) _win_getpeername(s, n, l) | 906 | #define GETPEERNAME(s, n, l) _win_getpeername (s, n, l) |
800 | #define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l) | 907 | #define GETSOCKNAME(s, n, l) _win_getsockname (s, n, l) |
801 | #define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p) | 908 | #define GETSOCKOPT(s, l, o, v, p) _win_getsockopt (s, l, o, v, p) |
802 | #define LISTEN(s, b) _win_listen(s, b) | 909 | #define LISTEN(s, b) _win_listen (s, b) |
803 | #define RECV(s, b, l, f) _win_recv(s, b, l, f) | 910 | #define RECV(s, b, l, f) _win_recv (s, b, l, f) |
804 | #define RECVFROM(s, b, l, f, r, o) _win_recvfrom(s, b, l, f, r, o) | 911 | #define RECVFROM(s, b, l, f, r, o) _win_recvfrom (s, b, l, f, r, o) |
805 | #define SELECT(n, r, w, e, t) _win_select(n, r, w, e, t) | 912 | #define SELECT(n, r, w, e, t) _win_select (n, r, w, e, t) |
806 | #define SEND(s, b, l, f) _win_send(s, b, l, f) | 913 | #define SEND(s, b, l, f) _win_send (s, b, l, f) |
807 | #define SENDTO(s, b, l, f, o, n) _win_sendto(s, b, l, f, o, n) | 914 | #define SENDTO(s, b, l, f, o, n) _win_sendto (s, b, l, f, o, n) |
808 | #define SETSOCKOPT(s, l, o, v, n) _win_setsockopt(s, l, o, v, n) | 915 | #define SETSOCKOPT(s, l, o, v, n) _win_setsockopt (s, l, o, v, n) |
809 | #define SHUTDOWN(s, h) _win_shutdown(s, h) | 916 | #define SHUTDOWN(s, h) _win_shutdown (s, h) |
810 | #define SOCKET(a, t, p) _win_socket(a, t, p) | 917 | #define SOCKET(a, t, p) _win_socket (a, t, p) |
811 | #define SOCKETPAIR(a, t, p, v) _win_socketpair(a, t, p, v) | 918 | #define SOCKETPAIR(a, t, p, v) _win_socketpair (a, t, p, v) |
812 | #define GETHOSTBYADDR(a, l, t) _win_gethostbyaddr(a, l, t) | 919 | #define GETHOSTBYADDR(a, l, t) _win_gethostbyaddr (a, l, t) |
813 | #define GETHOSTBYNAME(n) _win_gethostbyname(n) | 920 | #define GETHOSTBYNAME(n) _win_gethostbyname (n) |
814 | #define GETTIMEOFDAY(t, n) gettimeofday(t, n) | 921 | #define GETTIMEOFDAY(t, n) gettimeofday (t, n) |
815 | #define INSQUE(e, p) _win_insque(e, p) | 922 | #define INSQUE(e, p) _win_insque (e, p) |
816 | #define REMQUE(e) _win_remque(e) | 923 | #define REMQUE(e) _win_remque (e) |
817 | #define HSEARCH(i, a) _win_hsearch(i, a) | 924 | #define HSEARCH(i, a) _win_hsearch (i, a) |
818 | #define HCREATE(n) _win_hcreate(n) | 925 | #define HCREATE(n) _win_hcreate (n) |
819 | #define HDESTROY() _win_hdestroy() | 926 | #define HDESTROY() _win_hdestroy () |
820 | #define HSEARCH_R(i, a, r, h) _win_hsearch_r(i, a, r, h) | 927 | #define HSEARCH_R(i, a, r, h) _win_hsearch_r (i, a, r, h) |
821 | #define HCREATE_R(n, h) _win_hcreate_r(n, h) | 928 | #define HCREATE_R(n, h) _win_hcreate_r (n, h) |
822 | #define HDESTROY_R(h) _win_hdestroy_r(h) | 929 | #define HDESTROY_R(h) _win_hdestroy_r (h) |
823 | #define TSEARCH(k, r, c) _win_tsearch(k, r, c) | 930 | #define TSEARCH(k, r, c) _win_tsearch (k, r, c) |
824 | #define TFIND(k, r, c) _win_tfind(k, r, c) | 931 | #define TFIND(k, r, c) _win_tfind (k, r, c) |
825 | #define TDELETE(k, r, c) _win_tdelete(k, r, c) | 932 | #define TDELETE(k, r, c) _win_tdelete (k, r, c) |
826 | #define TWALK(r, a) _win_twalk(r, a) | 933 | #define TWALK(r, a) _win_twalk (r, a) |
827 | #define TDESTROY(r, f) _win_tdestroy(r, f) | 934 | #define TDESTROY(r, f) _win_tdestroy (r, f) |
828 | #define LFIND(k, b, n, s, c) _win_lfind(k, b, n, s, c) | 935 | #define LFIND(k, b, n, s, c) _win_lfind (k, b, n, s, c) |
829 | #define LSEARCH(k, b, n, s, c) _win_lsearch(k, b, n, s, c) | 936 | #define LSEARCH(k, b, n, s, c) _win_lsearch (k, b, n, s, c) |
830 | #define STRUCT_STAT64 struct _stati64 | 937 | #define STRUCT_STAT64 struct _stati64 |
831 | #endif | 938 | #endif |
832 | 939 | ||
@@ -836,11 +943,11 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
836 | This is the type used by the `insque' and `remque' functions. */ | 943 | This is the type used by the `insque' and `remque' functions. */ |
837 | 944 | ||
838 | struct PLIBC_SEARCH_QELEM | 945 | struct PLIBC_SEARCH_QELEM |
839 | { | 946 | { |
840 | struct qelem *q_forw; | 947 | struct qelem *q_forw; |
841 | struct qelem *q_back; | 948 | struct qelem *q_back; |
842 | char q_data[1]; | 949 | char q_data[1]; |
843 | }; | 950 | }; |
844 | 951 | ||
845 | 952 | ||
846 | /* Insert ELEM into a doubly-linked list, after PREV. */ | 953 | /* Insert ELEM into a doubly-linked list, after PREV. */ |
@@ -857,17 +964,17 @@ typedef PLIBC_SEARCH__compar_fn_t _win_comparison_fn_t; | |||
857 | 964 | ||
858 | /* Action which shall be performed in the call the hsearch. */ | 965 | /* Action which shall be performed in the call the hsearch. */ |
859 | typedef enum | 966 | typedef enum |
860 | { | 967 | { |
861 | PLIBC_SEARCH_FIND, | 968 | PLIBC_SEARCH_FIND, |
862 | PLIBC_SEARCH_ENTER | 969 | PLIBC_SEARCH_ENTER |
863 | } | 970 | } |
864 | PLIBC_SEARCH_ACTION; | 971 | PLIBC_SEARCH_ACTION; |
865 | 972 | ||
866 | typedef struct PLIBC_SEARCH_entry | 973 | typedef struct PLIBC_SEARCH_entry |
867 | { | 974 | { |
868 | char *key; | 975 | char *key; |
869 | void *data; | 976 | void *data; |
870 | } | 977 | } |
871 | PLIBC_SEARCH_ENTRY; | 978 | PLIBC_SEARCH_ENTRY; |
872 | 979 | ||
873 | /* The reentrant version has no static variables to maintain the state. | 980 | /* The reentrant version has no static variables to maintain the state. |
@@ -889,7 +996,8 @@ _PLIBC_SEARCH_ENTRY; | |||
889 | ACTION is `FIND' return found entry or signal error by returning | 996 | ACTION is `FIND' return found entry or signal error by returning |
890 | NULL. If ACTION is `ENTER' replace existing data (if any) with | 997 | NULL. If ACTION is `ENTER' replace existing data (if any) with |
891 | ITEM.data. */ | 998 | ITEM.data. */ |
892 | PLIBC_SEARCH_ENTRY *_win_hsearch (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION __action); | 999 | PLIBC_SEARCH_ENTRY *_win_hsearch (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION |
1000 | __action); | ||
893 | 1001 | ||
894 | /* Create a new hashing table which will at most contain NEL elements. */ | 1002 | /* Create a new hashing table which will at most contain NEL elements. */ |
895 | int _win_hcreate (size_t __nel); | 1003 | int _win_hcreate (size_t __nel); |
@@ -899,17 +1007,20 @@ void _win_hdestroy (void); | |||
899 | 1007 | ||
900 | /* Data type for reentrant functions. */ | 1008 | /* Data type for reentrant functions. */ |
901 | struct PLIBC_SEARCH_hsearch_data | 1009 | struct PLIBC_SEARCH_hsearch_data |
902 | { | 1010 | { |
903 | struct _PLIBC_SEARCH_ENTRY *table; | 1011 | struct _PLIBC_SEARCH_ENTRY *table; |
904 | unsigned int size; | 1012 | unsigned int size; |
905 | unsigned int filled; | 1013 | unsigned int filled; |
906 | }; | 1014 | }; |
907 | 1015 | ||
908 | /* Reentrant versions which can handle multiple hashing tables at the | 1016 | /* Reentrant versions which can handle multiple hashing tables at the |
909 | same time. */ | 1017 | same time. */ |
910 | int _win_hsearch_r (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION __action, PLIBC_SEARCH_ENTRY **__retval, | 1018 | int _win_hsearch_r (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION __action, |
911 | struct PLIBC_SEARCH_hsearch_data *__htab); | 1019 | PLIBC_SEARCH_ENTRY **__retval, |
1020 | struct PLIBC_SEARCH_hsearch_data *__htab); | ||
1021 | |||
912 | int _win_hcreate_r (size_t __nel, struct PLIBC_SEARCH_hsearch_data *__htab); | 1022 | int _win_hcreate_r (size_t __nel, struct PLIBC_SEARCH_hsearch_data *__htab); |
1023 | |||
913 | void _win_hdestroy_r (struct PLIBC_SEARCH_hsearch_data *__htab); | 1024 | void _win_hdestroy_r (struct PLIBC_SEARCH_hsearch_data *__htab); |
914 | 1025 | ||
915 | 1026 | ||
@@ -930,20 +1041,21 @@ PLIBC_SEARCH_VISIT; | |||
930 | /* Search for an entry matching the given KEY in the tree pointed to | 1041 | /* Search for an entry matching the given KEY in the tree pointed to |
931 | by *ROOTP and insert a new element if not found. */ | 1042 | by *ROOTP and insert a new element if not found. */ |
932 | void *_win_tsearch (__const void *__key, void **__rootp, | 1043 | void *_win_tsearch (__const void *__key, void **__rootp, |
933 | PLIBC_SEARCH__compar_fn_t __compar); | 1044 | PLIBC_SEARCH__compar_fn_t __compar); |
934 | 1045 | ||
935 | /* Search for an entry matching the given KEY in the tree pointed to | 1046 | /* Search for an entry matching the given KEY in the tree pointed to |
936 | by *ROOTP. If no matching entry is available return NULL. */ | 1047 | by *ROOTP. If no matching entry is available return NULL. */ |
937 | void *_win_tfind (__const void *__key, void *__const *__rootp, | 1048 | void *_win_tfind (__const void *__key, void *__const *__rootp, |
938 | PLIBC_SEARCH__compar_fn_t __compar); | 1049 | PLIBC_SEARCH__compar_fn_t __compar); |
939 | 1050 | ||
940 | /* Remove the element matching KEY from the tree pointed to by *ROOTP. */ | 1051 | /* Remove the element matching KEY from the tree pointed to by *ROOTP. */ |
941 | void *_win_tdelete (__const void *__restrict __key, | 1052 | void *_win_tdelete (__const void *__restrict __key, |
942 | void **__restrict __rootp, | 1053 | void **__restrict __rootp, |
943 | PLIBC_SEARCH__compar_fn_t __compar); | 1054 | PLIBC_SEARCH__compar_fn_t __compar); |
944 | 1055 | ||
945 | typedef void (*PLIBC_SEARCH__action_fn_t) (__const void *__nodep, PLIBC_SEARCH_VISIT __value, | 1056 | typedef void (*PLIBC_SEARCH__action_fn_t) (__const void *__nodep, |
946 | int __level); | 1057 | PLIBC_SEARCH_VISIT __value, |
1058 | int __level); | ||
947 | 1059 | ||
948 | /* Walk through the whole tree and call the ACTION callback for every node | 1060 | /* Walk through the whole tree and call the ACTION callback for every node |
949 | or leaf. */ | 1061 | or leaf. */ |
@@ -960,12 +1072,14 @@ void _win_tdestroy (void *__root, PLIBC_SEARCH__free_fn_t __freefct); | |||
960 | /* Perform linear search for KEY by comparing by COMPAR in an array | 1072 | /* Perform linear search for KEY by comparing by COMPAR in an array |
961 | [BASE,BASE+NMEMB*SIZE). */ | 1073 | [BASE,BASE+NMEMB*SIZE). */ |
962 | void *_win_lfind (__const void *__key, __const void *__base, | 1074 | void *_win_lfind (__const void *__key, __const void *__base, |
963 | size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t __compar); | 1075 | size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t |
1076 | __compar); | ||
964 | 1077 | ||
965 | /* Perform linear search for KEY by comparing by COMPAR function in | 1078 | /* Perform linear search for KEY by comparing by COMPAR function in |
966 | array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */ | 1079 | array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */ |
967 | void *_win_lsearch (__const void *__key, void *__base, | 1080 | void *_win_lsearch (__const void *__key, void *__base, |
968 | size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t __compar); | 1081 | size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t |
1082 | __compar); | ||
969 | 1083 | ||
970 | 1084 | ||
971 | #ifdef __cplusplus | 1085 | #ifdef __cplusplus |
@@ -973,6 +1087,6 @@ void *_win_lsearch (__const void *__key, void *__base, | |||
973 | #endif | 1087 | #endif |
974 | 1088 | ||
975 | 1089 | ||
976 | #endif //_PLIBC_H_ | 1090 | #endif // _PLIBC_H_ |
977 | 1091 | ||
978 | /* end of plibc.h */ | 1092 | /* end of plibc.h */ |