OLD | NEW |
1 /* | 1 /* |
2 * jinclude.h | 2 * jinclude.h |
3 * | 3 * |
4 * Copyright (C) 1991-1994, Thomas G. Lane. | 4 * Copyright (C) 1991-1994, Thomas G. Lane. |
5 * This file is part of the Independent JPEG Group's software. | 5 * This file is part of the Independent JPEG Group's software. |
6 * For conditions of distribution and use, see the accompanying README file. | 6 * For conditions of distribution and use, see the accompanying README file. |
7 * | 7 * |
8 * This file exists to provide a single place to fix any problems with | 8 * This file exists to provide a single place to fix any problems with |
9 * including the wrong system include files. (Common problems are taken | 9 * including the wrong system include files. (Common problems are taken |
10 * care of by the standard jconfig symbols, but on really weird systems | 10 * care of by the standard jconfig symbols, but on really weird systems |
11 * you may have to edit this file.) | 11 * you may have to edit this file.) |
12 * | 12 * |
13 * NOTE: this file is NOT intended to be included by applications using the | 13 * NOTE: this file is NOT intended to be included by applications using the |
14 * JPEG library. Most applications need only include jpeglib.h. | 14 * JPEG library. Most applications need only include jpeglib.h. |
15 */ | 15 */ |
16 | 16 |
17 | 17 |
18 /* Include auto-config file to find out which system include files we need. */ | 18 /* Include auto-config file to find out which system include files we need. */ |
19 | 19 |
20 #include "jconfig.h" /* auto configuration options */ | 20 #include "jconfig.h" /* auto configuration options */ |
21 #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ | 21 #define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ |
22 | 22 |
23 #include "../../core/include/fxcrt/fx_system.h" | 23 #include "core/include/fxcrt/fx_system.h" |
| 24 |
24 /* | 25 /* |
25 * We need the NULL macro and size_t typedef. | 26 * We need the NULL macro and size_t typedef. |
26 * On an ANSI-conforming system it is sufficient to include <stddef.h>. | 27 * On an ANSI-conforming system it is sufficient to include <stddef.h>. |
27 * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to | 28 * Otherwise, we get them from <stdlib.h> or <stdio.h>; we may have to |
28 * pull in <sys/types.h> as well. | 29 * pull in <sys/types.h> as well. |
29 * Note that the core JPEG library does not require <stdio.h>; | 30 * Note that the core JPEG library does not require <stdio.h>; |
30 * only the default error handler and data source/destination modules do. | 31 * only the default error handler and data source/destination modules do. |
31 * But we must pull it in because of the references to FILE in jpeglib.h. | 32 * But we must pull it in because of the references to FILE in jpeglib.h. |
32 * You can remove those references if you want to compile without <stdio.h>. | 33 * You can remove those references if you want to compile without <stdio.h>. |
33 */ | 34 */ |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 /* | 94 /* |
94 * The modules that use fread() and fwrite() always invoke them through | 95 * The modules that use fread() and fwrite() always invoke them through |
95 * these macros. On some systems you may need to twiddle the argument casts. | 96 * these macros. On some systems you may need to twiddle the argument casts. |
96 * CAUTION: argument order is different from underlying functions! | 97 * CAUTION: argument order is different from underlying functions! |
97 */ | 98 */ |
98 | 99 |
99 #define JFREAD(file,buf,sizeofbuf) \ | 100 #define JFREAD(file,buf,sizeofbuf) \ |
100 ((size_t) FXSYS_fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)
)) | 101 ((size_t) FXSYS_fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)
)) |
101 #define JFWRITE(file,buf,sizeofbuf) \ | 102 #define JFWRITE(file,buf,sizeofbuf) \ |
102 ((size_t) FXSYS_fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf),
(file))) | 103 ((size_t) FXSYS_fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf),
(file))) |
OLD | NEW |