Debian Codegraph @

src/main/curve-cache.c

raw symbols SCIP
1 /*
2 *
3 * Gimp-Print color management module - traditional Gimp-Print algorithm.
4 *
5 * Copyright 1997-2000 Michael Sweet ([email protected]) and
6 * Robert Krawitz ([email protected])
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 * for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 /*
23 * This file must include only standard C header files. The core code must
24 * compile on generic platforms that don't support glib, gimp, gtk, etc.
25 */
26
27 #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`!
28 #include <config.h>cxx . . $ `<file>/config.h`/
29 #endif
30 #include <gutenprint/gutenprint.h>cxx . . $ `<file>/include/gutenprint/gutenprint.h`/
31 #include "gutenprint-internal.h"cxx . . $ `<file>/src/main/gutenprint-internal.h`/
32 #include <gutenprint/gutenprint-intl-internal.h>cxx . . $ `<file>/include/gutenprint/gutenprint-intl-internal.h`/
33 #include <gutenprint/curve-cache.h>cxx . . $ `<file>/include/gutenprint/curve-cache.h`/
34 #include <math.h>
35 #ifdef HAVE_LIMITS_Hcxx . . $ `../../config.h:94:9`!
36 #include <limits.h>
37 #endif
38 #include <string.h>
39
40 void
41 stp_curve_free_curve_cachecxx . . $ stp_curve_free_curve_cache(acd0198871977558).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
42 {
43 if (cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)
44 stp_curve_destroycxx . . $ stp_curve_destroy(357dc05c3c24eef1).(cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.);
45 cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
46 cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
47 cache->s_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#s_cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
48 cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count. = 0;
49 }
50
51 void
52 stp_curve_cache_curve_datacxx . . $ stp_curve_cache_curve_data(acd0198871977558).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
53 {
54 if (cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. && !cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache.)
55 {
56 cache->s_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#s_cache. = stp_curve_get_ushort_datacxx . . $ stp_curve_get_ushort_data(7bdaa827c136097e).(cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., &(cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count.));
57 cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache. = stp_curve_get_datacxx . . $ stp_curve_get_data(2a13b0d70f8dce87).(cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., &(cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count.));
58 }
59 }
60
61 stp_curve_tcxx . . $ stp_curve_t# *
62 stp_curve_cache_get_curvecxx . . $ stp_curve_cache_get_curve(bc2110944d39e504).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
63 {
64 return cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.;
65 }
66
67 void
68 stp_curve_cache_curve_invalidatecxx . . $ stp_curve_cache_curve_invalidate(acd0198871977558).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
69 {
70 cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
71 cache->s_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#s_cache. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
72 cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count. = 0;
73 }
74
75 void
76 stp_curve_cache_set_curvecxx . . $ stp_curve_cache_set_curve(ef2a931d75d808f1).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache, stp_curve_tcxx . . $ stp_curve_t# *curve)
77 {
78 stp_curve_cache_curve_invalidatecxx . . $ stp_curve_cache_curve_invalidate(acd0198871977558).(cache);
79 cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. = curve;
80 }
81
82 void
83 stp_curve_cache_set_curve_copycxx . . $ stp_curve_cache_set_curve_copy(692867caac9445c1).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache, const stp_curve_tcxx . . $ stp_curve_t# *curve)
84 {
85 stp_curve_cache_curve_invalidatecxx . . $ stp_curve_cache_curve_invalidate(acd0198871977558).(cache);
86 cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve. = stp_curve_create_copycxx . . $ stp_curve_create_copy(df54bc0b812d6ee).(curve);
87 }
88
89 size_t
90 stp_curve_cache_get_countcxx . . $ stp_curve_cache_get_count(2bf3e894a223bde4).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
91 {
92 if (cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)
93 {
94 if (!cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache.)
95 cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache. = stp_curve_get_datacxx . . $ stp_curve_get_data(2a13b0d70f8dce87).(cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., &(cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count.));
96 return cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count.;
97 }
98 else
99 return 0;
100 }
101
102 const unsigned short *
103 stp_curve_cache_get_ushort_datacxx . . $ stp_curve_cache_get_ushort_data(81a6a9e0c9de4f49).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
104 {
105 if (cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)
106 {
107 if (!cache->s_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#s_cache.)
108 cache->s_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#s_cache. =
109 stp_curve_get_ushort_datacxx . . $ stp_curve_get_ushort_data(7bdaa827c136097e).(cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., &(cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count.));
110 return cache->s_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#s_cache.;
111 }
112 else
113 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
114 }
115
116 const double *
117 stp_curve_cache_get_double_datacxx . . $ stp_curve_cache_get_double_data(8229010fa992967f).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *cache)
118 {
119 if (cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)
120 {
121 if (!cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache.)
122 cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache. = stp_curve_get_datacxx . . $ stp_curve_get_data(2a13b0d70f8dce87).(cache->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve., &(cache->countcxx . . $ $anonymous_type_3c95b9fcff2ba970_0#count.));
123 return cache->d_cachecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#d_cache.;
124 }
125 else
126 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
127 }
128
129 void
130 stp_curve_cache_copycxx . . $ stp_curve_cache_copy(dbdf3b6f7b20c1ad).(stp_cached_curve_tcxx . . $ stp_cached_curve_t# *dest, const stp_cached_curve_tcxx . . $ stp_cached_curve_t# *src)
131 {
132 stp_curve_cache_curve_invalidatecxx . . $ stp_curve_cache_curve_invalidate(acd0198871977558).(dest);
133 if (dest != src)
134 {
135 if (src->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.)
136 stp_curve_cache_set_curve_copycxx . . $ stp_curve_cache_set_curve_copy(692867caac9445c1).(dest, src->curvecxx . . $ $anonymous_type_3c95b9fcff2ba970_0#curve.);
137 }
138 }