grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / lcms2 / utils / common / utils.h
blobdb3a0b65263aa3947b8e1d8a55c3a9246c054c86
2 //---------------------------------------------------------------------------------
3 //
4 // Little Color Management System
5 // Copyright (c) 1998-2010 Marti Maria Saguer
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining
8 // a copy of this software and associated documentation files (the "Software"),
9 // to deal in the Software without restriction, including without limitation
10 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 // and/or sell copies of the Software, and to permit persons to whom the Software
12 // is furnished to do so, subject to the following conditions:
14 // The above copyright notice and this permission notice shall be included in
15 // all copies or substantial portions of the Software.
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
19 // THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 //---------------------------------------------------------------------------------
27 #ifndef _lcms_utils_h
29 // Deal with Microsoft's attempt at deprecating C standard runtime functions
30 #ifdef _MSC_VER
31 # if (_MSC_VER >= 1400)
32 # ifndef _CRT_SECURE_NO_DEPRECATE
33 # define _CRT_SECURE_NO_DEPRECATE
34 # endif
35 # ifndef _CRT_SECURE_NO_WARNINGS
36 # define _CRT_SECURE_NO_WARNINGS
37 # endif
38 # endif
39 #endif
41 #include "lcms2.h"
43 #include <string.h>
44 #include <stdarg.h>
45 #include <ctype.h>
46 #include <stdio.h>
47 #include <stdlib.h>
48 #include <ctype.h>
49 #include <math.h>
50 #include <wchar.h>
52 // Avoid warnings
54 #define UTILS_UNUSED_PARAMETER(x) ((void)x)
56 // Init the utility functions
58 void InitUtils(const char* PName);
60 // Fatal Error (print the message and exit(1))---------------------------------------------
62 extern int Verbose;
64 void FatalError(const char *frm, ...);
66 // xgetopt() interface -------------------------------------------------------------
68 extern int xoptind;
69 extern char *xoptarg;
70 extern int xopterr;
71 extern char SW;
73 int xgetopt(int argc, char *argv[], char *optionS);
75 // The stock profile utility -------------------------------------------------------
77 cmsHPROFILE OpenStockProfile(cmsContext ContextID, const char* File);
79 // The print info utility ----------------------------------------------------------
81 void PrintProfileInformation(cmsHPROFILE h);
83 // ---------------------------------------------------------------------------------
85 void PrintRenderingIntents(void);
86 void PrintBuiltins(void);
88 // ---------------------------------------------------------------------------------
90 cmsBool SaveMemoryBlock(const cmsUInt8Number* Buffer, cmsUInt32Number dwLen, const char* Filename);
92 // ---------------------------------------------------------------------------------
94 // Return a pixel type on depending on the number of channels
95 int PixelTypeFromChanCount(int ColorChannels);
97 // ------------------------------------------------------------------------------
99 // Return number of channels of pixel type
100 int ChanCountFromPixelType(int ColorChannels);
102 #define _lcms_utils_h
103 #endif